A working “service” script in Ubuntu Intrepid

September 2, 2008

I managed hundreds of Red Hat, Fedora, and CentOS servers between 1998 and 2006. That’s over 8 years of using the service command to start, stop, restart, and obtain the status of the many services located in /etc/init.d.

After my migration to Ubuntu, I would often find myself trying to use the service command at an Ubuntu command prompt.

With some digging, I might have found two different implementations in Ubuntu, trying to provide the service command’s functionality, in the packages:

  • sysvconfig
  • debian-helper-scripts

However, neither of these implementations were very good or complete.

After taking an overnight flight to London, Rick Clark and I were on the Gatwick Express heading into Canonical’s office in London.  We decided that the Ubuntu Server would very much benefit from a clean implementation of the traditional Red Hat service command, installed by default.

And thus, /usr/bin/service is now provided by sysvinit-utils (2.86.ds1-59ubuntu4) in Intrepid.  This provides a convenient wrapper for running things like:

  • service apache2 restart

And it also provides a comprehensive mechanism for gathering the status of all services on the system:

  • service –status-all

Which, at the moment, exposes how many init scripts we have that are lacking status actions.  If you would like to help with that, please see:

:-Dustin

One Response to “A working “service” script in Ubuntu Intrepid”

  1. l30 Says:

    Hello Dustin!

    By the time I got my UbuntuFF running on my notebook I was wondering about the “service”. I have used RH based linux since that time. Thank you for bringing this simple and useful command to Ubuntu!

    []’s!
    -l30-


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: