I'm using the following code to start my app as a daemon,
rackup = " sudo rackup --port #{PORT} --host #{HOST || 'localhost'} --pid /var/run/#{NAME}.pid -O NAME[#{NAME}] -D"
exec "(cd /#{ROOT} && exec #{rackup})"
but it doesn't actually start, It loads all the files in (I can see from the logs) but no .pid
file is created. What am I doing wrong? Any suggestions?
As a side note, does NAME['app_name']
mean I can then use sudo pkill app_name
to kill the daemon?
The problem was with a bug with thin, after fiddling I got it to display an error message, after some poking around I found this, I installed thin 1.6.3 and it fixed the problem, now I just need to work out why I can't access the site, then I can try deploying it.
EDIT: Turns out I was setting it to the wrong host, should have been '0.0.0.0' rather then 'localhost' even though I did do
set :bind, '0.0.0.0'
in my main app