diff --git a/scripts/restore b/scripts/restore index 26195e7..a0a1a34 100644 --- a/scripts/restore +++ b/scripts/restore @@ -129,7 +129,7 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name ynh_script_progression --message="Restoring the systemd configuration..." ynh_restore_file --origin_path="/etc/systemd/system/$app.service" -systemctl enable $app.service +systemctl enable $app.service --quiet #================================================= # INTEGRATE SERVICE IN YUNOHOST diff --git a/scripts/upgrade b/scripts/upgrade index c16f112..878c18b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -228,14 +228,6 @@ pushd "$final_path" sudo -u $app env $ynh_node_load_PATH yarn install --production --pure-lockfile popd -#================================================= -# SETUP LOGROTATE -#================================================= -ynh_script_progression --message="Upgrading logrotate configuration..." - -# Use logrotate to manage app-specific logfile(s) -ynh_use_logrotate --non-append - #================================================= # SETUP SYSTEMD #================================================= @@ -254,6 +246,28 @@ ynh_script_progression --message="Securing files and directories..." # Set permissions on app files chown -R $app:$app $final_path +#================================================= +# SETUP LOGROTATE +#================================================= +ynh_script_progression --message="Upgrading logrotate configuration..." + +# Use logrotate to manage app-specific logfile(s) +ynh_use_logrotate --non-append + +#================================================= +# INTEGRATE SERVICE IN YUNOHOST +#================================================= +ynh_script_progression --message="Integrating service in YunoHost..." + +yunohost service add $app --description "$app daemon for Peertube" --log "$datadir/logs/peertube.log" + +#================================================= +# START SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting a systemd service..." + +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Server listening on localhost" + #================================================= # SETUP SSOWAT #================================================= @@ -266,13 +280,6 @@ then ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" fi -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Starting a systemd service..." - -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Server listening on localhost" - #================================================= # RELOAD NGINX #=================================================