1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Deprecate Raspbian 8 / php5 support. Resolves #438

This commit is contained in:
billz 2019-11-22 13:01:59 +00:00
parent 671baf587d
commit a06de39da2

View File

@ -18,12 +18,9 @@ elif [ "$version" -eq "9" ]; then
version_msg="Raspbian 9.0 (Stretch)"
php_package="php7.0-cgi"
elif [ "$version" -eq "8" ]; then
version_msg="Raspbian 8.0 (Jessie)"
php_package="php5-cgi"
else
version_msg="Raspbian earlier than 8.0 (Wheezy)"
webroot_dir="/var/www"
php_package="php5-cgi"
install_error "Raspbian 8.0 (Jessie) and php5 are deprecated. Please upgrade."
elif [ "$version" -lt "8" ]; then
install_error "Raspbian ${version} is unsupported. Please upgrade."
fi
phpcgiconf=""
@ -31,8 +28,6 @@ if [ "$php_package" = "php7.1-cgi" ]; then
phpcgiconf="/etc/php/7.1/cgi/php.ini"
elif [ "$php_package" = "php7.0-cgi" ]; then
phpcgiconf="/etc/php/7.0/cgi/php.ini"
elif [ "$php_package" = "php5-cgi" ]; then
phpcgiconf="/etc/php5/cgi/php.ini"
fi
### NOTE: all the below functions are overloadable for system-specific installs
@ -147,7 +142,7 @@ function install_openvpn() {
sudo apt-get install -y openvpn || install_error "Unable to install openvpn"
sudo sed -i "s/\('RASPI_OPENVPN_ENABLED', \)false/\1true/g" "$webroot_dir/includes/config.php" || install_error "Unable to modify config.php"
echo "Enabling openvpn-client service on boot"
sudo systemctl enable openvpn-client@client || install_error "Unable to enable opevpn-client daemon"
sudo systemctl enable openvpn-client@client || install_error "Unable to enable openvpn-client daemon"
create_openvpn_scripts || install_error "Unable to create openvpn control scripts"
}