[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    =?ISO-8859-1?Q?R=E9f=2E_=3A_Re=3A_Restarting_Apache2=2E2_from_PERL?=
From:       "Matthieu FEREYRE" <matthieu.fereyre () sagem ! com>
Date:       2007-08-29 12:03:07
Message-ID: OF53DB35A9.0044D236-ONC1257346.0041DFE1-C1257346.00423445 () sagem ! com
[Download RAW message or body]

--=_alternative 00423442C1257346_Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

The point of that is to restart apache from a web adress like 
http://my_server/restart (after authentification)
The function :
kill -USR1 apache_pid
do that extremly well but apache doesn't have the rights to launch it from 
perl !
(because the ppid of apache is launched by root)






Stephane GUIBOUD-RIBAUD <stephane.guiboud-ribaud@st.com>

29/08/2007 13:56
Remis le : 29/08/2007 13:57

 
        Pour :  modperl@perl.apache.org
        cc :    (ccc : Matthieu FEREYRE/DSEC/SAGEM)
        Objet : Re: Restarting Apache2.2 from PERL



It's like a suicide ?
If you kill Apache, you kill yourself.

Probably, you can create a detached process from your script that will
be in charge of making the stuff.

Take care about OS you are running perl on to do this.

Regards

Matthieu FEREYRE a écrit :
> Is it possible to restart Apache from a perl script (executed by Apache) 
?
> 
> I tried to send a Kill system command with no success.
> 
> Any idea ?
> 
> FEREYRE Matthieu
> 
> " Ce courriel et les documents qui y sont attaches peuvent contenir des 
> informations confidentielles. Si vous n'etes pas le destinataire 
> escompte, merci d'en informer l'expediteur immediatement et de detruire 
> ce courriel ainsi que tous les documents attaches de votre systeme 
> informatique. Toute divulgation, distribution ou copie du present 
> courriel et des documents attaches sans autorisation prealable de son 
> emetteur est interdite."
> 
> " This e-mail and any attached documents may contain confidential or 
> proprietary information. If you are not the intended recipient, please 
> advise the sender immediately and delete this e-mail and all attached 
> documents from your computer system. Any unauthorised disclosure, 
> distribution or copying hereof is prohibited."
> 





" Ce courriel et les documents qui y sont attaches peuvent contenir des informations \
confidentielles. Si vous n'etes  pas le destinataire escompte, merci d'en informer \
l'expediteur immediatement et de detruire ce courriel  ainsi que tous les documents \
attaches de votre systeme informatique. Toute divulgation, distribution ou copie du \
present courriel et des documents attaches sans autorisation prealable de son \
emetteur est interdite." 

" This e-mail and any attached documents may contain confidential or proprietary \
information. If you are not the intended recipient, please advise the sender \
immediately and delete this e-mail and all attached documents from your computer \
                system. Any unauthorised disclosure, distribution or copying hereof \
                is prohibited."
--=_alternative 00423442C1257346_Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


<p><font size=2 face="sans-serif">The point of that is to restart apache from a web \
adress like http://my_server/restart (after authentification)</font><p><font size=2 \
face="sans-serif">The function :</font><p><font size=2 face="sans-serif">kill -USR1 \
apache_pid</font><p><font size=2 face="sans-serif">do that extremly well but apache \
doesn't have the rights to launch it from perl !</font><p><font size=2 \
face="sans-serif">(because the ppid of apache is launched by \
root)</font><p><p><br><br><br><table width=100%><tr valign=top><td><td><font size=1 \
face="sans-serif"><b>Stephane GUIBOUD-RIBAUD \
&lt;stephane.guiboud-ribaud@st.com&gt;</b></font><br><p><font size=1 \
face="sans-serif">29/08/2007 13:56</font><br><font size=1 face="sans-serif">Remis le \
: 29/08/2007 13:57</font><br><td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; \
&nbsp; </font><br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Pour : \
&nbsp; &nbsp; &nbsp; &nbsp;modperl@perl.apache.org</font><br><font size=1 \
face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc : &nbsp; &nbsp; &nbsp; &nbsp;(ccc : \
Matthieu FEREYRE/DSEC/SAGEM)</font><br><font size=1 face="sans-serif">&nbsp; &nbsp; \
&nbsp; &nbsp; Objet : &nbsp; &nbsp; &nbsp; &nbsp;Re: Restarting Apache2.2 from \
PERL</font><br></table><br><br><br><font size=2 face="Courier New">It's like a \
suicide ?<br>If you kill Apache, you kill yourself.<br><br>Probably, you can create a \
detached process from your script that will<br>be in charge of making the \
stuff.<br><br>Take care about OS you are running perl on to do \
this.<br><br>Regards<br><br>Matthieu FEREYRE a écrit :<br>&gt; Is it possible to \
restart Apache from a perl script (executed by Apache) ?<br>&gt; <br>&gt; I tried to \
send a Kill system command with no success.<br>&gt; <br>&gt; Any idea ?<br>&gt; \
<br>&gt; FEREYRE Matthieu<br>&gt; <br>&gt; &quot; Ce courriel et les documents qui y \
sont attaches peuvent contenir des <br>&gt; informations confidentielles. Si vous \
n'etes pas le destinataire <br>&gt; escompte, merci d'en informer l'expediteur \
immediatement et de detruire <br>&gt; ce courriel ainsi que tous les documents \
attaches de votre systeme <br>&gt; informatique. Toute divulgation, distribution ou \
copie du present <br>&gt; courriel et des documents attaches sans autorisation \
prealable de son <br>&gt; emetteur est interdite.&quot;<br>&gt; <br>&gt; &quot; This \
e-mail and any attached documents may contain confidential or <br>&gt; proprietary \
information. If you are not the intended recipient, please <br>&gt; advise the sender \
immediately and delete this e-mail and all attached <br>&gt; documents from your \
computer system. Any unauthorised disclosure, <br>&gt; distribution or copying hereof \
is prohibited.&quot;<br>&gt; <br></font><br><br><BR> <BR>
&quot; Ce courriel et les documents qui y sont attaches peuvent contenir des \
informations confidentielles. Si vous n'etes  pas le destinataire escompte, merci \
d'en informer l'expediteur immediatement et de detruire ce courriel  ainsi que tous \
les documents attaches de votre systeme informatique. Toute divulgation, distribution \
ou copie du present courriel et des documents attaches sans autorisation prealable de \
son emetteur est interdite.&quot; <BR> <BR>
&quot; This e-mail and any attached documents may contain confidential or proprietary \
information. If you are not the intended recipient, please advise the sender \
immediately and delete this e-mail and all attached documents from your computer \
system. Any unauthorised disclosure, distribution or copying hereof is \
                prohibited.&quot;<BR>
--=_alternative 00423442C1257346_=--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic