diff --git a/scripts/restore b/scripts/restore index 7da7578..043dfe2 100644 --- a/scripts/restore +++ b/scripts/restore @@ -71,9 +71,14 @@ chown -R $app:$app $final_path #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= - -ynh_restore_file "/etc/php5/fpm/pool.d/$app.conf" -ynh_restore_file "/etc/php5/fpm/conf.d/20-$app.ini" +if [ "$(lsb_release --codename --short)" != "jessie" ] +then + ynh_restore_file "/etc/php/7.0/fpm/pool.d/$app.conf" + ynh_restore_file "/etc/php/7.0/fpm/conf.d/20-$app.ini" +else + ynh_restore_file "/etc/php5/fpm/pool.d/$app.conf" + ynh_restore_file "/etc/php5/fpm/conf.d/20-$app.ini" +fi #================================================= # SPECIFIC RESTORATION @@ -81,14 +86,22 @@ ynh_restore_file "/etc/php5/fpm/conf.d/20-$app.ini" # REINSTALL DEPENDENCIES #================================================= -# Define and install dependencies -ynh_install_app_dependencies php5-sqlite +if [ "$(lsb_release --codename --short)" != "jessie" ] +then + ynh_install_app_dependencies php7.0-sqlite3 +else + ynh_install_app_dependencies php5-sqlite +fi #================================================= # GENERIC FINALIZATION #================================================= # RELOAD NGINX AND PHP-FPM #================================================= - -systemctl reload php5-fpm +if [ "$(lsb_release --codename --short)" != "jessie" ] +then + systemctl reload php7.0-fpm +else + systemctl reload php5-fpm +fi systemctl reload nginx