From 09dbe3ea06af5c65d9a11ed117b0eb059750eae5 Mon Sep 17 00:00:00 2001 From: Xabi Spacebiker Date: Thu, 5 Oct 2017 00:17:46 +0200 Subject: [PATCH] Update install Adding support for Debian 9 Stretch --- install | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/install b/install index bc1183636..8a3311ca1 100755 --- a/install +++ b/install @@ -135,7 +135,7 @@ function systemInitDetect() { # Get the path of the command where pid=1 following any symlinks pid_1_path=$(readlink --canonicalize -n /proc/1/exe) # returns '/sbin/init' (Debian Wheezy & Ubuntu Trusty) - # returns '(/usr)?/lib/systemd/systemd' (Debian Jessie, Ubuntu Xenial, CentOS 7) + # returns '(/usr)?/lib/systemd/systemd' (Debian Stretch, Debian Jessie, Ubuntu Xenial, CentOS 7) verbose "Detected path to PID=1 process: $pid_1_path" # Get package of PID=1 path as it identifies the init system pid_1_package=$(dpkg -S $pid_1_path 2>/dev/null || @@ -566,6 +566,7 @@ fi # Validate the distribution and release is a supported one; set boolean flags. is_debian_dist=false +is_debian_stretch=false is_debian_jessie=false is_debian_wheezy=false is_ubuntu_dist=false @@ -589,6 +590,11 @@ case "${dist}-${code}" in is_ubuntu_dist=true is_ubuntu_trusty=true ;; + debian-9|debian-stretch) + code="stretch" + is_debian_dist=true + is_debian_stretch=true + ;; debian-8|debian-jessie) code="jessie" is_debian_dist=true @@ -641,6 +647,7 @@ if [ "$ignore_dependencies" = "f" ]; then apt_force_options="--allow-downgrades --allow-remove-essential --allow-change-held-packages" # Get apt-get version by returning the 2nd parameter from the 1st line of output apt_version=$(apt-get --version |awk 'NR == 1 { print $2 }') + # returns: 1.4.7 (Debian Stretch) # returns: 0.9.7.9 (Debian Wheezy) # returns: 1.0.1ubuntu2 (Ubuntu Trusty) # returns: 1.0.9.8.4 (Debian Jessie) @@ -939,7 +946,7 @@ loud "-----------------------------------------------------" # Test common locations for php conf directory php_conf_dirs=( "/etc/php/7.0/apache2/conf.d" # Ubuntu Xenial - "/etc/php5/apache2/conf.d" # Debian Jessie, Ubuntu Trusty + "/etc/php5/apache2/conf.d" # Debian Stretch, Debian Jessie, Ubuntu Trusty "/etc/php.d" # CentOS 7 ) for php_conf in ${php_conf_dirs[@]}; do