Re: How to create startup script which start and stop certain services automatically.
Cameron Simpson <[email protected]> Tue, 29 Jun 2010 10:44:34 +1000
| Newsgroups | gmane.linux.redhat.rhn.user |
|---|---|
| Message-ID | <[email protected]> |
On 28Jun2010 10:16, Christopher L. Barnard <[email protected]> wrote: | On Mon, 2010-06-28 at 15:08 +0530, Pravin Uttam Kharat wrote: | > 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...... | | [ Excellent description of the SnnFOO script scheme... ] | 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****** And for your second requirement, have the "start" script use the "at" command to schedule a run of the "stop" script at a suitable time. -- Cameron Simpson <[email protected]> DoD#743 http://www.cskk.ezoshosting.com/cs/ It is better never to have been born. But who among us has such luck?