diff --git a/scripts/experimental_helper.sh b/scripts/experimental_helper.sh index dc680bf..9c71494 100644 --- a/scripts/experimental_helper.sh +++ b/scripts/experimental_helper.sh @@ -124,3 +124,9 @@ ynh_remove_uwsgi_service () { ynh_secure_remove --file="/etc/systemd/system/uwsgi-app@$app.service.d" fi } + +ynh_restore_uwsgi_service () { + ynh_check_global_uwsgi_config + systemctl enable "uwsgi-app@$app" --quiet + yunohost service add "uwsgi-app@$app" --log "/var/log/uwsgi/$app/$app.log" +} diff --git a/scripts/restore b/scripts/restore index 7e9f87f..f5b4698 100644 --- a/scripts/restore +++ b/scripts/restore @@ -83,9 +83,7 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./ ynh_script_progression --message="Reloading services..." --weight=3 -ynh_check_global_uwsgi_config -systemctl enable "uwsgi-app@$app" --quiet -yunohost service add "uwsgi-app@$app" --log "/var/log/uwsgi/$app/$app.log" +ynh_restore_uwsgi_service #================================================= # GENERIC FINALIZATION