First :
Port existing script from another distro. I tried it with Mandriva and everything went fine. I have joined that script to this article, so you can try.
Second :
Modify ~/.bashrc and add :
service ()
/etc/init.d/$1 $2
This method seems to me far more interesting and cuter.
Third :
Use /etc/init.d/
You’ll also like to find something like chkconfig for Redhat based distros.
Try using http://sysv-rc-conf.sourceforge.net/
To install:
sudo apt-get install sysv-rc-conf
sysv-rc-conf
Excerpt from the manual:
DESCRIPTION
sysv-rc-conf gives an easy to use interface for managing /etc/rcrunlevel.d/ symlinks. The interface comes in two different flavors, one that simply allows turning services on or off and another that allows for more fine tuned management of the symlinks. It’s a replacement for programs like ntsysv(8) or rcconf(8).
sysv-rc-conf can also be used at the command line when the desired changes to the symlinks are already known. The syntax is borrowed from chkconfig(8).