PDA

View Full Version : Start and Stop Multiple sc_serv's with PHP


wedtm
2nd November 2006, 22:04
So a quickie here, does anyone know an easy and streamlined way of starting/stopping sc_serv in php.
So far I just use:


exec($sc_servpath."/sc_serv ".$sc_conf_file." > /dev/null 2>&1 &");


That will start it, but to stop it I have to kind of use a shady way by grepping the conf file out of a "ps aux -u <username> |grep <conf file name>". Then kill off the process. Is there an easier way?