0

I am new to Ubuntu 14.04. I am trying to write a script that is being executed when ubuntu boots.

so my script file gunicorn.sh looks like this

cd /path/to/folder/with/manage.py/
exec gunicorn --env DJANGO_SETTINGS_MODULE=app.my_settings app.wsgi

I made it excutable and now when I run it using this

./gunicorn.sh

it works. Now I placed it into

/etc/init.d

and did this

sudo update-rc.d -f gunicorn.sh defaults

and I got this message

update-rc.d: using dependency based boot sequencing insserv: warning: script 'gunicorn.sh' missing LSB tags and overrides which I found out is not important.

However, when I boot it doesn't work, it's not executing the script

1 Answers1

0

Your error is because you need to add LSB tags to the script. See here:

https://wiki.debian.org/LSBInitScripts

An easier way to do this do is just to add a new startup application. Search "Startup Applications" in the dashboard and point to your script. This way you can keep it anywhere you want.

example

Eric Schafur
  • 81
  • 1
  • 7