installing a script as startup service in ubuntu
- by Jibin
I have a script openerp-server.py in ~/openerp/stable6/server/bin/.I want it to be run at startup.(As a service or not - I don't know the difference)
These are the steps I followed
1 Created a script 'openerp-server' with the following lines in /etc/init.d/
#!/bin/sh
cd ~/openerp/stable6/server/bin/
exec /usr/bin/python ./openerp-server.py $@
2 Made the script executable by using the following command
sudo chmod +x /etc/init.d/openerp-server
3 Made the link run on startup by using the following command
sudo update-rc.d openerp-server
I checked using sysv-rc-conf.And openerp-server was selected for run level 2,3,4,5.
Now after restarting I checked if the openerp-server.py is running, it was not running.
Please help.