This commit is contained in:
eric_G 2025-11-08 15:50:43 +01:00
parent eff8205f77
commit 7c7f8f3331
4 changed files with 15 additions and 23 deletions

View file

@ -13,25 +13,17 @@ ynh_print_info "Declaring files to be backed up..."
ynh_backup "$install_dir"
#=================================================
# BACKUP THE NGINX CONFIGURATION
# BACKUP SYSTEM CONFIGURATION
#=================================================
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP LOGROTATE
#=================================================
ynh_backup "/etc/logrotate.d/$app"
#=================================================
# BACKUP SYSTEMD
#=================================================
ynh_backup "/etc/systemd/system/$app-web.service"
ynh_backup "/etc/systemd/system/$app-sidekiq.service"
ynh_backup "/etc/systemd/system/$app-streaming.service"
ynh_backup "/etc/logrotate.d/$app"
#=================================================
# BACKUP VARIOUS FILES
#=================================================

View file

@ -141,12 +141,12 @@ ynh_config_add_logrotate
#=================================================
ynh_script_progression "Starting all systemd services..."
ynh_systemctl --service=${app}-web --action="start" --log_path=/var/log/$app/$app-web.log --wait_until="Listening on"
ynh_systemctl --service=${app}-sidekiq --action="start" --log_path=/var/log/$app/$app-sidekiq.log --wait_until="Schedules Loaded"
ynh_systemctl --service=${app}-streaming --action="start" --log_path=/var/log/$app/$app-streaming.log --wait_until="Streaming API now listening"
ynh_systemctl --service=${app}-web --action="start" --log_path=/var/log/$app/$app-web.log #--wait_until="Listening on"
ynh_systemctl --service=${app}-sidekiq --action="start" --log_path=/var/log/$app/$app-sidekiq.log #--wait_until="Schedules Loaded"
ynh_systemctl --service=${app}-streaming --action="start" --log_path=/var/log/$app/$app-streaming.log #--wait_until="Streaming API now listening"
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Installation of $app completed"
ynh_script_progression "Installation of $app completed"

View file

@ -73,9 +73,9 @@ ynh_restore "/etc/logrotate.d/$app"
#=================================================
ynh_script_progression "Reloading NGINX web server and $app's service..."
ynh_systemctl --service=${app}-web --action="start" --log_path=/var/log/$app/$app-web.log --wait_until="Listening on"
ynh_systemctl --service=${app}-sidekiq --action="start" --log_path=/var/log/$app/$app-sidekiq.log --wait_until="Schedules Loaded"
ynh_systemctl --service=${app}-streaming --action="start" --log_path=/var/log/$app/$app-streaming.log --wait_until="Streaming API now listening"
ynh_systemctl --service=${app}-web --action="start" --log_path=/var/log/$app/$app-web.log #--wait_until="Listening on"
ynh_systemctl --service=${app}-sidekiq --action="start" --log_path=/var/log/$app/$app-sidekiq.log #--wait_until="Schedules Loaded"
ynh_systemctl --service=${app}-streaming --action="start" --log_path=/var/log/$app/$app-streaming.log #--wait_until="Streaming API now listening"
ynh_systemctl --service=nginx --action=reload

View file

@ -17,8 +17,8 @@ fi
#=================================================
ynh_script_progression "Stopping $app's systemd service..."
ynh_systemctl --service=${app}-web --action="stop" --log_path=/var/log/$app/$app-web.log --wait_until="Goodbye"
ynh_systemctl --service=${app}-sidekiq --action="stop" --log_path=/var/log/$app/$app-sidekiq.log --wait_until="Bye"
ynh_systemctl --service=${app}-web --action="stop" --log_path=/var/log/$app/$app-web.log
ynh_systemctl --service=${app}-sidekiq --action="stop" --log_path=/var/log/$app/$app-sidekiq.log
ynh_systemctl --service=${app}-streaming --action="stop" --log_path=/var/log/$app/$app-streaming.log
#=================================================
@ -152,9 +152,9 @@ popd
#=================================================
ynh_script_progression "Starting $app's systemd service..."
ynh_systemctl --service=${app}-web --action="restart" --log_path=/var/log/$app/$app-web.log --wait_until="Listening on"
ynh_systemctl --service=${app}-sidekiq --action="start" --log_path=/var/log/$app/$app-sidekiq.log --wait_until="Schedules Loaded"
ynh_systemctl --service=${app}-streaming --action="start" --log_path=/var/log/$app/$app-streaming.log --wait_until="Streaming API now listening"
ynh_systemctl --service=${app}-web --action="restart" --log_path=/var/log/$app/$app-web.log #--wait_until="Listening on"
ynh_systemctl --service=${app}-sidekiq --action="start" --log_path=/var/log/$app/$app-sidekiq.log #--wait_until="Schedules Loaded"
ynh_systemctl --service=${app}-streaming --action="start" --log_path=/var/log/$app/$app-streaming.log #--wait_until="Streaming API now listening"
#=================================================
# END OF SCRIPT