lib/generators/capistrano/sidekiq/systemd/templates/sidekiq.service.capistrano.erb in capistrano-sidekiq-2.2.0 vs lib/generators/capistrano/sidekiq/systemd/templates/sidekiq.service.capistrano.erb in capistrano-sidekiq-2.3.0

- old
+ new

@@ -3,17 +3,17 @@ # This file tells systemd how to run Sidekiq as a 24/7 long-running daemon. # # Customize this file based on your bundler location, app directory, etc. # Customize and copy this into /usr/lib/systemd/system (CentOS) or /lib/systemd/system (Ubuntu). # Then run: -# - systemctl enable sidekiq -# - systemctl {start,stop,restart} sidekiq +# - systemctl enable <%= sidekiq_service_unit_name %> +# - systemctl {start,stop,restart} <%= sidekiq_service_unit_name %> # # This file corresponds to a single Sidekiq process. Add multiple copies # to run multiple processes (sidekiq-1, sidekiq-2, etc). # -# Use `journalctl -u sidekiq -rn 100` to view the last 100 lines of log output. +# Use `journalctl -u <%= sidekiq_service_unit_name %> -rn 100` to view the last 100 lines of log output. # [Unit] Description=sidekiq for <%= "#{fetch(:application)} (#{fetch(:stage)})" %> # start us only once the network and logging subsystems are available, # consider adding redis-server.service if Redis is local and systemd-managed. @@ -42,12 +42,11 @@ WatchdogSec=10 WorkingDirectory=<%= File.join(fetch(:deploy_to), 'current') %> ExecStart=<%= expanded_bundle_path %> exec sidekiq -e <%= fetch(:sidekiq_env) %> <%= sidekiq_config %> <%= sidekiq_concurrency %> <%= sidekiq_queues %> -# Use `systemctl kill -s TSTP sidekiq` to quiet the Sidekiq process - +# Use `systemctl kill -s TSTP <%= sidekiq_service_unit_name %>` to quiet the Sidekiq process <%="User=#{sidekiq_user}" if sidekiq_user %> UMask=0002 <%="EnvironmentFile=#{File.join(fetch(:deploy_to), 'current')}/#{fetch(:sidekiq_service_unit_env_file)}" if fetch(:sidekiq_service_unit_env_file) %> @@ -61,10 +60,9 @@ # output goes to /var/log/syslog (Ubuntu) or /var/log/messages (CentOS) <%="StandardOutput=append:#{fetch(:sidekiq_log)}" if fetch(:sidekiq_log) %> <%="StandardError=append:#{fetch(:sidekiq_error_log)}" if fetch(:sidekiq_error_log) %> -# This will default to "bundler" if we don't specify it -SyslogIdentifier=sidekiq +SyslogIdentifier=<%= sidekiq_service_unit_name %> [Install] WantedBy=default.target