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">&lt;<a href=3D"mailto:[email protected]">cbarnard=
@rush.edu</a>&gt;</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>&gt; On 28Jun2010 10:16, Christopher L. Barnard &lt;<a href=3D"mail=
to:[email protected]">[email protected]</a>&gt; wrote:<br>&gt; | On Mon, 20=
10-06-28 at 15:08 +0530, Pravin Uttam Kharat wrote:<br>
&gt; | &gt; I have RHEL 5 I installed Bitnami Joomla on it.I want to config=
ure a<br>&gt; | &gt; startup script which run that script when RHEL 5 Machi=
ne start and<br>&gt; | &gt; automatically shut down machine on mentioned ti=
me. Please suggest any<br>
&gt; | &gt; tool for this......<br>&gt; |<br>&gt; | [ Excellent description=
 of the SnnFOO script scheme... ]<br>&gt; | You can put it all in one scrip=
t, and that is much easier for other<br>&gt; | individuals to understand wh=
at you are doing. =A0For &#39;start&#39;, the script<br>
&gt; | is called with the command line parameter of &quot;start&quot;. =A0 =
Likewise &#39;stop&#39;<br>&gt; | is called with the command line parameter=
 of &quot;stop&quot;. =A0So just switch on<br>&gt; | the command line param=
eter and you can put the script in /etc/init.d<br>
&gt; | with a symlink to /etc/rc2.d/S****** and to /etc/rc0.d/K******<br>&g=
t;<br>&gt; And for your second requirement, have the &quot;start&quot; scri=
pt use the &quot;at&quot;<br>&gt; command to schedule a run of the &quot;st=
op&quot; 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 &#39;at&#39; 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==--