<p>Hi.</p>
<p>I'm very sure executing external program from a scrip works. However, to be safe you should use modules that catch all std streams or at very least make sure you catch stdout of the program you exec.</p>
<p>Regards, Ruslan. From phone.</p>
<div class="gmail_quote">2010 10 2 00:39 пользователь "Peter Roosakos" <<a href="mailto:proosakos@yahoo.com">proosakos@yahoo.com</a>> написал:<br type="attribution">> Yeah, probably a bad idea to be using RT scrips to do this from a security<br>
> standpoint, but when it didn't work it peaked my curiosity.  I'll play with<br>> rights to see if this is indeed the only reason it didn't work...<br>> <br>> Thanks for the reply!<br>> <br>> Peter<br>
> <br>> <br>> -----Original Message-----<br>> From: Jerrad Pierce [mailto:<a href="mailto:jpierce@cambridgeenergyalliance.org">jpierce@cambridgeenergyalliance.org</a>] <br>> Sent: Friday, October 01, 2010 12:08 PM<br>
> To: Peter Roosakos<br>> Cc: rt-users<br>> Subject: Re: [rt-users] Using qx in scrip to run a shell script?<br>> <br>> On Fri, Oct 1, 2010 at 14:58, Peter Roosakos <<a href="mailto:proosakos@yahoo.com">proosakos@yahoo.com</a>> wrote:<br>
>> I was curious if it is possible to use the perl ‘qx’ or similar command<br>>> inside of a custom action scrip to run a system level shell script.  My<br>> goal<br>>> is to automate the process of restarting a system service or daemon.  I<br>
>> tried putting a couple of qx commands in the scrip. No errors, but no<br>>> restart either.<br>> Unless it's poorly configured, your webserver should not be root and<br>> therefore<br>> iughtn't not have the rights to do this.<br>
> <br>> Although more complex, if I were keen on such functionality, I'd have the<br>> script send a magic cookie to an alias connected to a script that does your<br>> dirty deed. Security of said script is left as a a blanket for the user to<br>
> throw<br>> right out the door, but rejecting messages not originating on localhost<br>> would<br>> be a start.<br>> <br>> Otherwise have you considered *shudder* SNMP?<br>> -- <br>> Cambridge Energy Alliance: Save money. Save the planet.<br>
> <br>> <br>> RT Training in Washington DC, USA on Oct 25 & 26 2010<br>> Last one this year -- Learn how to get the most out of RT!<br></div>