diff --git a/conf/sidekiq.service b/conf/sidekiq.service index d8b569e..b47adc7 100644 --- a/conf/sidekiq.service +++ b/conf/sidekiq.service @@ -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 diff --git a/conf/streaming.service b/conf/streaming.service index 73b6629..ccd4baf 100644 --- a/conf/streaming.service +++ b/conf/streaming.service @@ -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 diff --git a/conf/web.service b/conf/web.service index fbfb16b..4b23393 100644 --- a/conf/web.service +++ b/conf/web.service @@ -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 diff --git a/scripts/install b/scripts/install index 1fe62fc..d91ebad 100644 --- a/scripts/install +++ b/scripts/install @@ -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 diff --git a/scripts/restore b/scripts/restore index d00613e..c0bb3ce 100644 --- a/scripts/restore +++ b/scripts/restore @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index 15b260a..91fd79c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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