[clue] [Tech] Red Hat Ent Server runlevels

adam bultman adamb at glaven.org
Mon Jul 11 14:50:36 MDT 2011


The best, albeit more complicated way, would be to make your script
something that 'chkconfig' could understand and use.  That way, you
could put your script in /etc/init.d, and then do a 'chkconfig myscript
on', and it would add all the necessary symlinks to run your service at
the default runlevels.

That's what I do.  I usually just take an existing script, and edit it
to suit my purposes.



On 07/11/2011 12:38 PM, Bruce Ediger wrote:
> I'm a native Slackware user, and my other PC runs Arch at the moment,
> but I need some plain talk about Red Hat Enterprise Server runlevels.
>
> Suppose I have a server that I want started when a system boots.
> My understanding is this:
>
> I write a /bin/sh script that takes one command-line parameter, "start"
> or "stop".  When run with "start", the script has to fire up the server.
> When run with "stop", it has to stop the server.
>
> I put the /bin/sh script in /etc/rc.d/init.d.  I make it owned by
> root/root, and give it 700 permissions.
>
> I create symbolic links from that /bin/sh script to
> /etc/rc.d/rc3.d/S99mynewscript and /etc/rc.d/rc5.d/K99mynewscript
> and /etc/rc.d/rc6.d/K99mynewscript
>
> Then, I reboot and verify that my server gets stopped and started
> correctly.
>
> Is anything wrong with the procedure above? Have I mixed Slackware and
> Arch style runlevels with Red Hat runlevels?  Am I even close to
> correct?
>
> _______________________________________________
> clue mailing list: clue at cluedenver.org
> For information, account preferences, or to unsubscribe see:
> http://cluedenver.org/mailman/listinfo/clue

-- 
Adam



More information about the clue mailing list