Wattazoum’s Website
Home page > Intérêts > Linux > Ubuntu > Service Management wrapper

Service Management wrapper

Friday 28 July 2006, by Oumar-Aziz Ouattara

All the versions of this article: [English] [français]

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/ (No wrapper) . This command should run fine on any Linux system.

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).

Reply to this article

SPIP | template | | Site Map | Follow-up of the site's activity RSS 2.0