#!/bin/bash source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers #================================================= # RESTORE THE APP MAIN DIR #================================================= ynh_script_progression "Restoring the app main directory..." ynh_restore "$install_dir" myynh_set_permissions #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_uwsgi_service #================================================= # RELOAD NGINX AND PHP-FPM OR THE APP SERVICE #================================================= ynh_script_progression "Reloading NGINX web server and $app's service..." ynh_systemctl --service="uwsgi-app@$app.service" --action="start" --wait_until="WSGI app 0 \(mountpoint='[/[:alnum:]_-]*'\) ready in [[:digit:]]* seconds on interpreter" --log_path="/var/log/uwsgi/$app/$app.log" ynh_systemctl --service="nginx" --action="reload" #================================================= # END OF SCRIPT #================================================= ynh_script_progression "Restoration completed for $app"