How to run a script at startup?

Bryan O'Neal BONeal at cornerstonehome.com
Wed Aug 6 17:18:44 MST 2008


You were rite; all it needed was the header.  I am now even encouraged to implement a start and stop to my script...  but not today.   Thanks :)

-----Original Message-----
From: plug-discuss-bounces at lists.plug.phoenix.az.us [mailto:plug-discuss-bounces at lists.plug.phoenix.az.us] On Behalf Of Alex Dean
Sent: Wednesday, August 06, 2008 1:55 PM
To: Main PLUG discussion list
Subject: Re: How to run a script at startup?

Bryan O'Neal wrote:
> Ok, apparently things have changed since I had to do custom start up
> scripts.  I tired dumping my script in /ete/init.d/ and sim-linking  it
> out in /etc/rc6.d, /etc/rc5.d, & /etc/rc3.d but I get nothing for my
> efforts.  I goggled around and found chkconfig but all I get is does not
> support chkconfig.  I goggled some more for how to write a service
> script but got nothing useful back.  
> 
> Suggestions? 

Is this a RedHat-esque distro?  I'm guessing so due to the use of chkconfig.

'man chkconfig'

You need to put a special comment in your init script.  chkconfig reads 
this comment to know when to stop/start your script.  You should remove 
any symlinks you manually added to /etc/rc*.d, and let chkconfig manage 
all that stuff for you.

###
# chkconfig: 2345 55 25
# description: Manages the services you are controlling with the
# chkconfig command
###

The first set of numbers “2345″ is are the default runlevels for the 
service, and “55″ and “25″ represent the name of the “S” and “K” 
symbolic links, and the order in which the service will be started and 
stopped in the respective runlevel. You will need to change these last 
two numbers, making them unique.
http://spiralbound.net/2006/11/15/controlling-services-with-chkconfig



More information about the PLUG-discuss mailing list