0

I'm trying to daemonize a rake task by running the following command (on Ubuntu 12.04)

start-stop-daemon -S --pidfile /home/dep/apps/fid/current/tmp/pids/que.pid 
-u dep -d /home/dep/apps/fid/current -b -m
-a "bundle exec rake que:work RAILS_ENV=staging > /home/dep/apps/fid/current/log/que.log 2>&1"
-v

The console says

Starting bundle exec rake que:work RAILS_ENV=staging > /home/dep/apps/fid/current/log/que.log 2>&1...

Detaching to start bundle exec rake que:work RAILS_ENV=staging > /home/dep/apps/fid/current/log/que.log 2>&1...done.

but nothing happen.

the pid file is empty and no log file created.

Am I missing anything here?

Thanks.

Sig
  • 5,476
  • 10
  • 49
  • 89

1 Answers1

0

Try to get more about the environments (and their differences) when running bundle from your normal environment and running it from start-stop-daemon. e.g. print all env variables in both cases and adjust accordingly.

Gizmomogwai
  • 2,496
  • 1
  • 20
  • 21