[rhn-users] How to create startup script which start and stop certain services automatically.

Christopher L. Barnard cbarnard at rush.edu
Mon Jun 28 15:16:07 UTC 2010


Put the script to start the app in /etc/rc2.d.  The filename should
start with a capital S.  The two digit number is the order in which the
script will be run in reference to the rest of the scripts in that
directory.
Put the script to stop the app in /etc/rc0.d.  The filename should start
with a capital K.  The two digit number is again the order in which the
script will be run in reference to the rest of the scripts in that
directory.

You can put it all in one script, and that is much easier for other
individuals to understand what you are doing.  For 'start', the script
is called with the command line parameter of "start".   Likewise 'stop'
is called with the command line parameter of "stop".  So just switch on
the command line parameter and you can put the script in /etc/init.d
with a symlink to /etc/rc2.d/S****** and to /etc/rc0.d/K******

-- 
Christopher L. Barnard
---------------------------------------------------------------------
Comment your code as though the maintainer will be a homicidal maniac
who knows where you live.


On Mon, 2010-06-28 at 15:08 +0530, Pravin Uttam Kharat wrote:
> Hello Friends,
> 
> 
> 
> I have RHEL 5 I installed Bitnami Joomla on it.I want to configure a
> startup script which run that script when RHEL 5 Machine start and
> automatically shut down machine on mentioned time. Please suggest any
> tool for this......
> 
> 
> Thanks in advance.
> _______________________________________________
> rhn-users mailing list
> rhn-users at redhat.com
> https://www.redhat.com/mailman/listinfo/rhn-users




More information about the rhn-users mailing list