How to run a script at startup?
Alex Dean
alex at crackpot.org
Wed Aug 6 13:55:11 MST 2008
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 257 bytes
Desc: OpenPGP digital signature
Url : http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20080806/f7ae13e1/attachment.pgp
More information about the PLUG-discuss
mailing list