diff --git a/scripts/change_url b/scripts/change_url index 9aaf446..cbfe506 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -11,6 +11,13 @@ source /usr/share/yunohost/helpers #================================================= # STANDARD MODIFICATIONS +#================================================= +# STOP SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Stopping a systemd service..." --weight=1 + +ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" + #================================================= # MODIFY URL IN NGINX CONF #================================================= @@ -28,6 +35,13 @@ ynh_script_progression --message="Updating a configuration file..." ynh_replace_string --match_string="$old_domain$old_path" --replace_string="$new_domain$new_path" --target_file="$install_dir/publishconf.py" ynh_replace_string --match_string="$old_domain$old_path" --replace_string="$new_domain$new_path" --target_file="$install_dir/pelicanconf.py" +#================================================= +# START SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting a systemd service..." --weight=1 + +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index b05509b..01999cb 100644 --- a/scripts/restore +++ b/scripts/restore @@ -40,8 +40,9 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Reloading services.." --weight=1 +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" + ynh_systemd_action --service_name=nginx --action=reload -ynh_systemd_action --service_name=$app --action="start" #================================================= # END OF SCRIPT diff --git a/scripts/upgrade b/scripts/upgrade index 8153aed..2079190 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -93,7 +93,7 @@ yunohost service add $app --description="Static Site Generator" --log="/var/log/ ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" #================================================= # END OF SCRIPT