Posts Tagged ‘skeleton service’

Starting a Program at Boot-time

February 9, 2013

First step is to become root. One of the following should do

sudo su
ssh root@localhost

Next step is to copy the skeleton service:

cp /etc/init.d/skeleton /etc/init.d/SERVICENAME

Then update the copy to make sure that the variables DESC, NAME, DAEMON, DAEMON_ARGS, PIDFILE, and SCRIPTNAME are correct:

nano /etc/init.d/SERVICENAME

Then depending on distribution run one of the following (first is for debian, last is for redhat):

update-rc.d SERVICENAME defaults
chkconfig SERVICENAME on