Running System Commands

I have a DID which runs through a script and executes a bash script to turn on and off webmin and httpd

when i execute them at command line - it works, they go stop, they start, over and over.

when i execute through Asterisk, it will start them however it wont stop them.

if i start them via cmd line, asterisk can stop them.

the scripts are:


/etc/init.d/webmin stop
/etc/init.d/httpd stop


/etc/init.d/httpd start
/etc/init.d/webmin start