1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/garradin_ynh.git synced 2024-09-03 18:36:17 +02:00

Update restore

This commit is contained in:
frju365 2018-07-01 11:25:00 +02:00 committed by GitHub
parent 08271a3928
commit fb5e64ba72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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