[asterisk-users] asterisk start with php
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Fri Apr 2 12:08:27 CDT 2010
On Fri, Apr 02, 2010 at 09:52:31AM -0700, Steve Edwards wrote:
>> On Fri, 2 Apr 2010, salaheddine elharit wrote:
>>
>>> thank you for your response but i need this solution as soon as possible
>>>
>>> to restart the asterisk service via a agent poste
>>>
>>> if ther is any solution please
>
> On Fri, 2 Apr 2010, Steve Edwards wrote:
>
>> Are you asking for clues or are you asking somebody to write it for you?
>>
>> General outline (off the top of my head) would be to add an entry to
>> /etc/sudoers to allow the user executing the httpd process to execute
>> /etc/init.d/asterisk (and maybe /etc/init.d/{zaptel,dahdi) and then add
>> a CGI to the web server that executes something like:
>
> "to allow the user executing the httpd process to execute
> /etc/init.d/asterisk as the user executing the Asterisk process"
Rather: you only need to allow it to run '/etc/init.d/asterisk restart'
No need to allow it any other action (and for 'status' it should already
have the permissions).
When using sudo and alike, keep in mind to provide the minimal required
permissions, and keep things as simple as possible.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
More information about the asterisk-users
mailing list