JitsuDan
Posts: 3
Joined: Mon Jan 14, 2013 9:12 am

Starting gunicorn on boot?

Sat Jan 19, 2013 4:44 pm

Hi,

I've got a simple Django app that I want to run on my RPi.
I want am using nginx and gunicorn to serve the app but I am having trouble getting it to work as soon as the system boots.

If I use the following command, it will start up OK:

Code: Select all

cd /home/pi/mysite && gunicorn_django -b 0.0.0.0:8000
However, I've tried setting this up using crontab and it doesn't seem to be working.

I did crontab -e and added the following:

Code: Select all

@reboot cd /home/pi/mysite && gunicorn_django -b 0.0.0.0:8000
Can anyone help?

Any advice appreciated.

Thanks

++bahjatk++
Posts: 36
Joined: Sun Dec 30, 2012 10:02 am

Re: Starting gunicorn on boot?

Sat Jan 19, 2013 6:47 pm

Try the following :
In terminal : sudo nano /etc/rc.local
scroll to the bottom, then add whatever command you want to run at boot

Return to “General discussion”