diff --git a/scripts/install b/scripts/install index 475a87d..0356111 100755 --- a/scripts/install +++ b/scripts/install @@ -170,3 +170,9 @@ fi #================================================= systemctl reload php7.1-fpm systemctl reload nginx +# 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 fe317c1..c27e745 100755 --- a/scripts/restore +++ b/scripts/restore @@ -113,3 +113,9 @@ cd $final_path && sudo /usr/bin/php7.1 artisan passport:install systemctl reload php7.1-fpm systemctl reload nginx +# 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 673b571..f3ecdff 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -184,3 +184,9 @@ fi #================================================= systemctl reload php7.1-fpm systemctl reload nginx +# 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