diff --git a/README.md b/README.md index 7f43d79..c262e09 100644 --- a/README.md +++ b/README.md @@ -9,19 +9,28 @@
NOTE: This only works for a fresh server with nothing on it but a new OS install!
## This Repository -Installer for the [UNIT3D Torrent Tracker Platform](https://github.com/HDInnovations/UNIT3D). +Installer for the [UNIT3D Torrent Tracker Platform](https://github.com/HDInnovations/UNIT3D-Community-Edition). **Officially Supported OS's** +- Ubuntu 20.04 LTS (Recommended) - Ubuntu 18.04 LTS - Ubuntu 16.04 LTS -**For latest release:** +**For Ubuntu 20.04 LTS:** ``` git clone https://github.com/poppabear8883/UNIT3D-INSTALLER.git installer cd installer sudo ./install.sh ``` +**For Ubuntu 16.04 LTS or Ubuntu 18.04 LTS:** +``` +git clone https://github.com/poppabear8883/UNIT3D-INSTALLER.git installer +git checkout Ubuntu-16.04-18.04 +cd installer +sudo ./install.sh +``` + ### General Support You can find us on the [UNIT3D Discord](https://discord.gg/Yk4NBUU) in the `#support` channel. diff --git a/install.sh b/install.sh index 3648bbf..67ab4f4 100755 --- a/install.sh +++ b/install.sh @@ -4,7 +4,6 @@ source tools/colors.sh # Detect OS case $(head -n1 /etc/issue | cut -f 1 -d ' ') in - Debian) type="debian" ;; Ubuntu) type="ubuntu" ;; *) type='' ;; esac @@ -18,10 +17,15 @@ if [ "$type" = '' ]; then echo -e "\n$Purple This can happen if you are using an OS template from a provider like OVH amongst others. $Color_Off\n" PS3='Please select the # for your OS: ' - options=("Ubuntu 18.04" "Ubuntu 16.04" "Other Ubuntu" "Debian" "Other" "Quit") + options=("Ubuntu 20.04" "Ubuntu 18.04" "Ubuntu 16.04" "Quit") select opt in "${options[@]}" do case $opt in + "Ubuntu 20.04") + echo 'Ubuntu 20.04 LTS \n \l' > /etc/issue + type='ubuntu' + break + ;; "Ubuntu 18.04") echo 'Ubuntu 18.04 LTS \n \l' > /etc/issue type='ubuntu' @@ -32,20 +36,6 @@ if [ "$type" = '' ]; then type='ubuntu' break ;; - "Other Ubuntu") - echo 'Ubuntu UNKNOWN LTS \n \l' > /etc/issue - type='ubuntu' - break - ;; - "Debian") - echo 'Debian GNU/Linux \n \l' > /etc/issue - type='debian' - break - ;; - "Other") - echo -e "$Red Unsupported GNU/Linux distribution $Color_Off" - exit 1 - ;; "Quit") exit 0 ;; diff --git a/src/Configs/app.php b/src/Configs/app.php index 2cf7976..a3c1575 100644 --- a/src/Configs/app.php +++ b/src/Configs/app.php @@ -12,7 +12,6 @@ * Map to the Installer class */ 'MySql' => MySqlSetup::class, - //'MariaDB' => '', //'Postgres' => '', ], @@ -53,6 +52,5 @@ /* API Keys */ 'tmdb-key' => '', - 'omdb-key' => '', 'igdb-key' => '', ]; diff --git a/src/Configs/os.php b/src/Configs/os.php index 91a9d1a..b34d371 100644 --- a/src/Configs/os.php +++ b/src/Configs/os.php @@ -6,7 +6,7 @@ * UBUNTU */ 'ubuntu' => [ - 'pkg_manager' => 'apt-get', + 'pkg_manager' => 'apt', 'web-user' => 'www-data', 'install_dir' => '/var/www/html', 'nginx-sites-available_path' => '/etc/nginx/sites-available', @@ -25,6 +25,7 @@ 'zip' => 'Compress Files', 'unzip' => 'Decompress Files', 'htop' => 'Monitor Server Resources', + 'libpng12-0' => 'PNG Library', ], ] diff --git a/src/Helpers/helpers.php b/src/Helpers/helpers.php index 90fdf8f..8cfa4dc 100644 --- a/src/Helpers/helpers.php +++ b/src/Helpers/helpers.php @@ -133,6 +133,9 @@ function distinfo() $mainver = $matches[0]; switch ($mainver) { + case "20.04": + $relname = "(Focal Fossa)"; + break; case "18.04": $relname = "(Bionic Beaver)"; break; diff --git a/src/Installer/Database/MySqlSetup.php b/src/Installer/Database/MySqlSetup.php index d0c3f16..96326fe 100644 --- a/src/Installer/Database/MySqlSetup.php +++ b/src/Installer/Database/MySqlSetup.php @@ -27,11 +27,11 @@ public function handle() $this->process(['cp -f ' . resource_path(distname() . "/mysql/$mycnf") . ' /etc/mysql/my.cnf']); if (distname() === 'ubuntu') { - if (distmainver() !== '16.04' && distmainver() !== '18.04') { + if (distmainver() !== '16.04' && distmainver() !== '18.04' && distmainver() !== '20.04') { $this->process(['mysql_install_db']); } - if (distmainver() === '18.04' && !is_dir('/var/lib/mysql')) { + if ((distmainver() === '18.04' || distmainver() === '20.04') && !is_dir('/var/lib/mysql')) { $this->process([ 'mkdir /var/lib/mysql', 'chown mysql:mysql /var/lib/mysql', @@ -64,7 +64,7 @@ public function handle() "mysql -e \"CREATE DATABASE $db\"", "mysql -e \"CREATE USER '$dbuser'@'localhost' IDENTIFIED BY '$dbpass';\"", "mysql -e \"GRANT ALL PRIVILEGES ON $db . * TO '$dbuser'@'localhost'\"", - "mysql -e \"UPDATE mysql.user SET authentication_string=PASSWORD('$root_pass') WHERE User='root'\"", + "mysql -e \"ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '$root_pass'\"", "mysql -e \"DELETE FROM mysql.user WHERE User=''\"", "mysql -e \"DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1')\"", ]); diff --git a/src/Installer/Nginx/NginxSetup.php b/src/Installer/Nginx/NginxSetup.php index d2af7ec..d8f601f 100644 --- a/src/Installer/Nginx/NginxSetup.php +++ b/src/Installer/Nginx/NginxSetup.php @@ -31,7 +31,7 @@ public function handle() "systemctl restart nginx" ]); - $this->install('python-certbot-nginx'); + $this->install('certbot python3-certbot-nginx'); if ($ssl == 'yes') { $this->process([ diff --git a/src/Installer/Server/ServerSetup.php b/src/Installer/Server/ServerSetup.php index a109b41..5e4886e 100644 --- a/src/Installer/Server/ServerSetup.php +++ b/src/Installer/Server/ServerSetup.php @@ -121,15 +121,6 @@ protected function apiKeys() $key = $this->question('TMDB Key', ''); $this->config->app('tmdb-key', $key); - $this->io->writeln('