добавил сервис
Description=Resque
[Service]
User=deploy
WorkingDirectory=/home/deploy/current
ExecStart=/home/deploy/.rbenv/shims/cap stage resque:start
ExecStop=/home/deploy/.rbenv/shims/cap stage resque:stop
Restart=on-failure
[Install]
WantedBy=multi-user.target
запускаю systemctl start resque.service
и по логам смотрю
Dec 23 14:34:28 test cap[4877]: 00:00 resque:start
Dec 23 14:34:28 test cap[4877]: Starting 1 worker(s) with QUEUE: positions
Dec 23 14:34:28 test cap[4877]: 01 nohup env RBENV_ROOT=$HOME/.rbenv RBENV_VERSION=2.4.6 $HOME/.rbenv/bin/rbenv exec bundle exec rake RACK_ENV=stage RAILS_ENV=stage VVERBOSE=1 QUEUE="positions" PIDFILE=/home/deploy/shared/tmp/pids/resque_work_1.pid BACKGROUND=yes INTERVAL=5 resque:work >> /dev/null 2>> /dev/null
Dec 23 14:34:37 test cap[4877]: ✔ 01 deploy@localhost 8.847s
Dec 23 14:34:37 test cap[4877]: Starting 1 worker(s) with QUEUE: sms
Dec 23 14:34:37 test cap[4877]: 02 nohup env RBENV_ROOT=$HOME/.rbenv RBENV_VERSION=2.4.6 $HOME/.rbenv/bin/rbenv exec bundle exec rake RACK_ENV=stage RAILS_ENV=stage VVERBOSE=1 QUEUE="sms" PIDFILE=/home/deploy/shared/tmp/pids/resque_work_2.pid BACKGROUND=yes INTERVAL=5 resque:work >> /dev/null 2>> /dev/null
Dec 23 14:34:46 test cap[4877]: ✔ 02 deploy@localhost 9.156s
Dec 23 14:34:47 test systemd[1]: Started Session 804 of user deploy.
Dec 23 14:34:47 test cap[6182]: 00:00 resque:stop
Dec 23 14:34:47 test cap[6182]: 01 kill -s QUIT 5258 && rm /home/deploy/shared/tmp/pids/resque_work_1.pid
Dec 23 14:34:47 test cap[6182]: ✔ 01 deploy@localhost 0.186s
Dec 23 14:34:47 test cap[6182]: 02 kill -s QUIT 5412 && rm /home/deploy/shared/tmp/pids/resque_work_2.pid
Dec 23 14:34:47 test cap[6182]: ✔ 02 deploy@localhost 0.170s
Dec 23 14:34:47 test systemd[1]: Stopping User Manager for UID 1000...
он стартует resque, но потом сразу выполняется команда stop, в чем может быть проблема?