diff --git a/scripts/restore b/scripts/restore index 21e6513..7296baa 100755 --- a/scripts/restore +++ b/scripts/restore @@ -17,7 +17,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -35,44 +34,31 @@ chmod -R o-rwx "$data_dir" chown -R $app:www-data "$data_dir" #================================================= -# RESTORE THE NGINX CONFIGURATION +# RESTORE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 +# RESTORE THE PHP-FPM CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE SYSTEMD -#================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 - ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_restore_file --origin_path="/etc/systemd/system/${app}_ldap.service" systemctl enable $app.service --quiet -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 - yunohost service add $app --description="Videoconferencing server" --needs_exposed_ports="$port_turn" yunohost service add ${app}_ldap --description="LDAP integration for the videoconferencing server" #================================================= -# START SYSTEMD SERVICE +# GENERIC FINALIZATION #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=3 +# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE +#================================================= +ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name=${app}_ldap --action="start" --log_path="systemd" -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX AND PHP-FPM -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - ynh_systemd_action --service_name=nginx --action=reload #=================================================