To add/remove service in ubuntu. Manually you can put init script in /etc/init.d then create symbolic link from /etc/rc?.d/S[NN]name or K[NN]name to /etc/init.d/scriptname.[S for start and K for stop]
In ubuntu has a tool to manage init scripts call update-rc.d. For example if you want to start serviceA in runlevel 2 3 4 5 with sequence number 18 and stop in runlevel 0 1 6 with sequence number 99 use the command.[the scriptA must already create in /etc/init.d]
In redhat base linux, i use chkconfig do the same thing. For more detail try 'man chkconfig'.
In ubuntu has a tool to manage init scripts call update-rc.d. For example if you want to start serviceA in runlevel 2 3 4 5 with sequence number 18 and stop in runlevel 0 1 6 with sequence number 99 use the command.[the scriptA must already create in /etc/init.d]
pnix@pnix-a7n:~$ sudo update-rc.d serviceA start 18 2 3 4 5 . stop 99 0 1 6
In redhat base linux, i use chkconfig do the same thing. For more detail try 'man chkconfig'.
Comments