Sha256: a40a146088ee36022ddf6c1423638794d7fdc84fbfe9d1264db77b5bcb1146b7

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 KB

Contents

[Unit]
Description=<%= @service_file %>
After=syslog.target network.target

[Service]
Type=notify
WatchdogSec=10

WorkingDirectory=<%= current_path %>
<% if fetch(:sidekiq_six_ruby_vm) == :rbenv %>
ExecStart=/bin/bash -lc 'exec /home/deploy/.rbenv/shims/bundle exec sidekiq <%= @side_kiq_args %>'
<% elsif fetch(:sidekiq_six_ruby_vm) == :rvm %>
ExecStart=<%= fetch(:rvm_path) %>/bin/rvm <%= fetch(:rvm_ruby_version) %> do bundle exec sidekiq <%= @side_kiq_args %>
<% else %>
ExecStart=/usr/local/bin/bundle exec sidekiq <%= @side_kiq_args %>
<% end %>


## build PID-File .. only working method :( .. (needed for monit)
ExecStartPost=/bin/bash -c '/bin/echo $MAINPID > <%= fetch(:sidekiq_six_pid_path) %>/<%= @service_file %>.pid'
ExecStopPost=/bin/bash -c 'rm <%= fetch(:sidekiq_six_pid_path) %>/<%= @service_file %>.pid'


User=<%= fetch(:sidekiq_six_user) %>
Group=<%= fetch(:sidekiq_six_user) %>
UMask=0002

Environment=MALLOC_ARENA_MAX=2

RestartSec=1
Restart=on-failure

StandardOutput=/var/log/syslog
StandardError=/var/log/syslog

SyslogIdentifier=sidekiq

[Install]
WantedBy=multi-user.target

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
magic_recipes_two-0.0.95 lib/generators/capistrano/magic_recipes/templates/sidekiq.service.erb