[ale] Starting a service

Kevin Krumwiede krum at smyrnacable.net
Thu Apr 25 21:20:11 EDT 2002


On Thu, 2002-04-25 at 14:01, Kevin O'Neill Stoll wrote:
> What would be the most professional way to start a service on boot-up?
> Currently, I am starting an application server from the command line and
> running it in the back ground but I would like for the service to just
> come up on boot.
> 
> 
> 
> How do I go about this and get a professional look such as ,
> 
> Starting sendmail      [ok]
> Starting httpd         [ok]
> Starting JBoss         [ok]
> 
> 
> kind of feedback on start up.
> 
> I guess I could just put a symbolic link to the script file but is this
> appropriate and professional?

If you are using a RedHat-based distro, the cleanest way would be to
write a script that works with chkconfig.  The script should be able to
run with the arguments 'start' and 'stop' (I think that's the minimum)
and maybe other arguments too ('restart', etc.)  Examples of such
scripts are usually found in /etc/init.d/.  The chkconfig part is just a
commented line that tells chkconfig what runlevels and in what order to
start and stop the service.  The chkconfig command will do all the
tedious work of setting up symlinks in /etc/rc.d/rc[0123456].d to start
and stop services during a change of runlevel.

The nifty little [ OK ] messages are usually from
/etc/init.d/functions.  Again, take a look at the existing scripts to
see how it's used.

Krum


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list