diff --git a/scripts/restore b/scripts/restore index 2ae8093..0f90dca 100644 --- a/scripts/restore +++ b/scripts/restore @@ -39,6 +39,10 @@ ynh_script_progression --message="Restoring dedicated user and rights folders... ynh_system_user_create --username="$app" --groups="$USER_GROUPS" ynh_restore_file --origin_path="/etc/sudoers.d/$app" +# restore nginx +ynh_script_progression --message="Restoring nginx web server..." +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + # restore source ynh_script_progression --message="Restoring the app..." ynh_restore_file --origin_path="$final_path" @@ -77,18 +81,17 @@ sed --in-place "/ExecStart/s/$/ --verbose/" "/etc/systemd/system/$app.service" ynh_systemd_action --service_name="$app" --action=start --line_match="Home Assistant initialized" --log_path="$log_file" --timeout=900 # remove --verbose from service and restart -ynh_replace_string --match_string=" --verbose" --replace_string="" --target_file="/etc/systemd/system/$app.service" -ynh_store_file_checksum --file="/etc/systemd/system/$app.service" -systemctl daemon-reload -ynh_systemd_action --service_name="$app" --action=restart +#ynh_replace_string --match_string=" --verbose" --replace_string="" --target_file="/etc/systemd/system/$app.service" +#ynh_store_file_checksum --file="/etc/systemd/system/$app.service" +#systemctl daemon-reload +#ynh_systemd_action --service_name="$app" --action=restart # restore logrotate ynh_script_progression --message="Restoring logrotate..." ynh_restore_file --origin_path="/etc/logrotate.d/$app" -# restore nginx -ynh_script_progression --message="Restoring nginx web server..." -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +# reload nginx +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload -ynh_script_progression --message="Recovery of $app completed" --last +ynh_script_progression --message="Restoration completed for $app" --last