[Asterisk-Users] Reload Asterisk from php or perl script

Peter Osborne pete at bookware3000.ca
Fri Oct 8 07:37:34 MST 2004


On Friday 08 October 2004 10:14, Dee Lowndes wrote:
> I am using apache but I would rather avoid this option if possible.
>
> Any other ideas?
>
> Dee

You could install sudo, then add a line in your /etc/sudoers like this:

www-data ALL= NOPASSWD: /usr/bin/asterisk

(this assumes apache runs under the username www-data)

Then add "sudo" in from of the command you are trying to exec and it will be 
executed as root. Obviously there are some security issues with doing this, 
but it will do the job. You could write a shell script that runs you asterisk 
command and then allow sudo for the script rather than asterisk itself, that 
would provide a little more security.

Pete



More information about the asterisk-users mailing list