diff --git a/scripts/install b/scripts/install index 6c3bf01..797c351 100755 --- a/scripts/install +++ b/scripts/install @@ -176,5 +176,9 @@ fi #================================================= systemctl reload php7.1-fpm systemctl reload nginx -# Set default php to php7.0 -update-alternatives --set php /usr/bin/php7.0 +# Set default php to php5 or php7.0 +if [ "$(lsb_release --codename --short)" == "jessie" ]; then + update-alternatives --set php /usr/bin/php5 +else + update-alternatives --set php /usr/bin/php7.0 +fi diff --git a/scripts/restore b/scripts/restore index 0bd7b89..71f6079 100755 --- a/scripts/restore +++ b/scripts/restore @@ -115,5 +115,9 @@ ynh_restore_file "/etc/cron.d/$app" systemctl reload php7.1-fpm systemctl reload nginx -# Set default php to php7.0 -update-alternatives --set php /usr/bin/php7.0 +# Set default php to php5 or php7.0 +if [ "$(lsb_release --codename --short)" == "jessie" ]; then + update-alternatives --set php /usr/bin/php5 +else + update-alternatives --set php /usr/bin/php7.0 +fi diff --git a/scripts/upgrade b/scripts/upgrade index 3d0c778..aefe3d8 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -147,5 +147,9 @@ fi #================================================= systemctl reload nginx -# Set default php to php7.0 -update-alternatives --set php /usr/bin/php7.0 +# Set default php to php5 or php7.0 +if [ "$(lsb_release --codename --short)" == "jessie" ]; then + update-alternatives --set php /usr/bin/php5 +else + update-alternatives --set php /usr/bin/php7.0 +fi