Re: How to create startup script which start and stop certain services automatically.
Pravin Uttam Kharat <[email protected]> Tue, 29 Jun 2010 20:21:56 +0530
| Newsgroups | gmane.linux.redhat.rhn.user |
|---|---|
| Message-ID | <[email protected]> |
--===============8430197972648156007== Content-Type: multipart/alternative; boundary=001485f1972cef73be048a2c6061 --001485f1972cef73be048a2c6061 Content-Type: text/plain; charset=ISO-8859-1 Thanx we have bitnami joomla stack so we need to go through /opt/xyz.sh this way to start our website manually. Thanx On Tue, Jun 29, 2010 at 7:57 PM, Christopher L. Barnard <[email protected]>wrote: > > On Tue, 2010-06-29 at 10:44 +1000, Cameron Simpson wrote: > > 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. > > Only if you want the script to be alive for a finite time. If the need > is for the app to start gracefully on system startup and stop gracefully > on system shutdown, then 'at' should definitely not be used. If it > should run for oh, say, the first 17 hours after powerup, then yes the > at command should be used. > > -- > Christopher L. Barnard > --------------------------------------------------------------------- > Comment your code as though the maintainer will be a homicidal maniac > who knows where you live. > > > _______________________________________________ > rhn-users mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/rhn-users > --001485f1972cef73be048a2c6061 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div>Thanx </div> <div>=A0</div> <div>we have bitnami joomla stack so we need to go through /opt/xyz.sh this= way to start our website manually. </div> <div>=A0</div> <div>Thanx <br><br></div> <div class=3D"gmail_quote">On Tue, Jun 29, 2010 at 7:57 PM, Christopher L. = Barnard <span dir=3D"ltr"><<a href=3D"mailto:[email protected]">cbarnard= @rush.edu</a>></span> wrote:<br> <blockquote style=3D"BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex= ; PADDING-LEFT: 1ex" class=3D"gmail_quote"> <div class=3D"im"><br>On Tue, 2010-06-29 at 10:44 +1000, Cameron Simpson wr= ote:<br>> On 28Jun2010 10:16, Christopher L. Barnard <<a href=3D"mail= to:[email protected]">[email protected]</a>> wrote:<br>> | On Mon, 20= 10-06-28 at 15:08 +0530, Pravin Uttam Kharat wrote:<br> > | > I have RHEL 5 I installed Bitnami Joomla on it.I want to config= ure a<br>> | > startup script which run that script when RHEL 5 Machi= ne start and<br>> | > automatically shut down machine on mentioned ti= me. Please suggest any<br> > | > tool for this......<br>> |<br>> | [ Excellent description= of the SnnFOO script scheme... ]<br>> | You can put it all in one scrip= t, and that is much easier for other<br>> | individuals to understand wh= at you are doing. =A0For 'start', the script<br> > | is called with the command line parameter of "start". =A0 = Likewise 'stop'<br>> | is called with the command line parameter= of "stop". =A0So just switch on<br>> | the command line param= eter and you can put the script in /etc/init.d<br> > | with a symlink to /etc/rc2.d/S****** and to /etc/rc0.d/K******<br>&g= t;<br>> And for your second requirement, have the "start" scri= pt use the "at"<br>> command to schedule a run of the "st= op" script at a suitable time.<br> <br></div>Only if you want the script to be alive for a finite time. =A0If = the need<br>is for the app to start gracefully on system startup and stop g= racefully<br>on system shutdown, then 'at' should definitely not be= used. =A0If it<br> should run for oh, say, the first 17 hours after powerup, then yes the<br>a= t command should be used.<br> <div class=3D"im"><br>--<br>Christopher L. Barnard<br>---------------------= ------------------------------------------------<br>Comment your code as th= ough the maintainer will be a homicidal maniac<br>who knows where you live.= <br> <br><br></div> <div> <div></div> <div class=3D"h5">_______________________________________________<br>rhn-us= ers mailing list<br><a href=3D"mailto:[email protected]">rhn-users@redha= t.com</a><br><a href=3D"https://www.redhat.com/mailman/listinfo/rhn-users" = target=3D"_blank">https://www.redhat.com/mailman/listinfo/rhn-users</a><br> </div></div></blockquote></div><br> --001485f1972cef73be048a2c6061-- --===============8430197972648156007== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ rhn-users mailing list [email protected] https://www.redhat.com/mailman/listinfo/rhn-users --===============8430197972648156007==--