mirror of
https://github.com/YunoHost-Apps/glitchsoc_ynh.git
synced 2024-09-03 19:15:59 +02:00
wip
This commit is contained in:
parent
30ba5a4a93
commit
91047ef811
6 changed files with 12 additions and 19 deletions
|
@ -13,8 +13,6 @@ Environment="MALLOC_ARENA_MAX=2"
|
|||
ExecStart=__RBENV_ROOT__/versions/__APP__/bin/bundle exec sidekiq -c 25
|
||||
TimeoutSec=15
|
||||
Restart=always
|
||||
StandardOutput=append:/var/log/__APP__/__APP__-sidekiq.log
|
||||
StandardError=inherit
|
||||
|
||||
# Sandboxing options to harden security
|
||||
# Depending on specificities of your service/app, you may need to tweak these
|
||||
|
|
|
@ -13,8 +13,6 @@ Environment="__YNH_NODE_LOAD_PATH__"
|
|||
ExecStart=__YNH_NODE__ ./streaming
|
||||
TimeoutSec=15
|
||||
Restart=always
|
||||
StandardOutput=append:/var/log/__APP__/__APP__-strealing.log
|
||||
StandardError=inherit
|
||||
|
||||
# Sandboxing options to harden security
|
||||
# Depending on specificities of your service/app, you may need to tweak these
|
||||
|
|
|
@ -13,8 +13,6 @@ ExecStart=__RBENV_ROOT__/versions/__APP__/bin/bundle exec puma -C config/puma.rb
|
|||
ExecReload=/bin/kill -SIGUSR1 $MAINPID
|
||||
TimeoutSec=15
|
||||
Restart=always
|
||||
StandardOutput=append:/var/log/__APP__/__APP__-web.log
|
||||
StandardError=inherit
|
||||
|
||||
# Sandboxing options to harden security
|
||||
# Depending on specificities of your service/app, you may need to tweak these
|
||||
|
|
|
@ -161,9 +161,9 @@ popd
|
|||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
||||
|
||||
ynh_systemd_action --service_name=${app}-web --action="start" --log_path=/var/log/$app/$app-web.log --line_match="Listening on"
|
||||
ynh_systemd_action --service_name=${app}-sidekiq --action="start" --log_path=/var/log/$app/$app-sidekiq.log --line_match="Schedules Loaded"
|
||||
ynh_systemd_action --service_name=${app}-streaming --action="start" --log_path=/var/log/$app/$app-streaming.log --line_match="Worker 1 now listening"
|
||||
ynh_systemd_action --service_name=${app}-web --action="start" --log_path=systemd --line_match="Listening on"
|
||||
ynh_systemd_action --service_name=${app}-sidekiq --action="start" --log_path=systemd --line_match="Schedules Loaded"
|
||||
ynh_systemd_action --service_name=${app}-streaming --action="start" --log_path=systemd --line_match="now listening on"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -90,9 +90,9 @@ ynh_restore_file --origin_path="/etc/cron.d/$app"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Starting $app's service and reloading NGINX..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=${app}-web --action="start" --log_path=/var/log/$app/${app}-web.log --line_match="Listening on"
|
||||
ynh_systemd_action --service_name=${app}-sidekiq --action="start" --log_path=/var/log/$app/${app}-sidekiq.log --line_match="Schedules Loaded"
|
||||
ynh_systemd_action --service_name=${app}-streaming --action="start" --log_path=/var/log/$app/${app}-streaming.log --line_match="Worker 1 now listening"
|
||||
ynh_systemd_action --service_name=${app}-web --action="start" --log_path=systemd --line_match="Listening on"
|
||||
ynh_systemd_action --service_name=${app}-sidekiq --action="start" --log_path=systemd --line_match="Schedules Loaded"
|
||||
ynh_systemd_action --service_name=${app}-streaming --action="start" --log_path=systemd --line_match="now listening on"
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ fi
|
|||
|
||||
# Rename the database to match packaging v2 defaults db_name
|
||||
if [[ $db_name = *'_production' ]]; then
|
||||
# Logs from v1 are handled by systemd
|
||||
ynh_systemd_action --service_name=${app}-web --action="stop" --log_path=systemd --line_match="Stopped"
|
||||
ynh_systemd_action --service_name=${app}-sidekiq --action="stop" --log_path=systemd --line_match="Stopped"
|
||||
ynh_systemd_action --service_name=${app}-streaming --action="stop" --log_path=systemd --line_match="Stopped"
|
||||
|
@ -72,9 +71,9 @@ fi
|
|||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=${app}-web --action="stop" --log_path=/var/log/$app/${app}-web.log --line_match="Stopped"
|
||||
ynh_systemd_action --service_name=${app}-sidekiq --action="stop" --log_path=/var/log/$app/${app}-sidekiq.log --line_match="Stopped"
|
||||
ynh_systemd_action --service_name=${app}-streaming --action="stop" --log_path=/var/log/$app/${app}-streaming.log --line_match="Stopped"
|
||||
ynh_systemd_action --service_name=${app}-web --action="stop" --log_path=systemd --line_match="Stopped"
|
||||
ynh_systemd_action --service_name=${app}-sidekiq --action="stop" --log_path=systemd --line_match="Stopped"
|
||||
ynh_systemd_action --service_name=${app}-streaming --action="stop" --log_path=systemd --line_match="Stopped"
|
||||
|
||||
#=================================================
|
||||
# "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...)
|
||||
|
@ -173,9 +172,9 @@ chown $app:$app "$config"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=${app}-web --action="start" --log_path=/var/log/$app/${app}-web.log --line_match="Listening on"
|
||||
ynh_systemd_action --service_name=${app}-sidekiq --action="start" --log_path=/var/log/$app/${app}-sidekiq.log --line_match="Schedules Loaded"
|
||||
ynh_systemd_action --service_name=${app}-streaming --action="start" --log_path=/var/log/$app/${app}-streaming.log --line_match="Worker 1 now listening"
|
||||
ynh_systemd_action --service_name=${app}-web --action="start" --log_path=systemd --line_match="Listening on"
|
||||
ynh_systemd_action --service_name=${app}-sidekiq --action="start" --log_path=systemd --line_match="Schedules Loaded"
|
||||
ynh_systemd_action --service_name=${app}-streaming --action="start" --log_path=systemd --line_match="now listening on"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Add table
Reference in a new issue