草庐IT

immortal

全部标签

php - 用 php 启动一个守护进程

我希望能够通过单击网站上的按钮来停止/启动守护程序(在Debian上)。我知道守护进程可以工作,因为它通过SSH启动和停止。我什至可以用捕获状态$status=exec("/etc/init.d/MyService.shstatus|grep'isrunning'");但这行不通:exec('/etc/init.d/MyService.shstart',$output);我收到此错误:启动系统MyService守护程序:失败!我想这与权限有关,但我不知道如何。.pid文件的权限为-rwxrw-rw-我读了这个https://stackoverflow.com/a/6720364/348

php - 用 php 启动一个守护进程

我希望能够通过单击网站上的按钮来停止/启动守护程序(在Debian上)。我知道守护进程可以工作,因为它通过SSH启动和停止。我什至可以用捕获状态$status=exec("/etc/init.d/MyService.shstatus|grep'isrunning'");但这行不通:exec('/etc/init.d/MyService.shstart',$output);我收到此错误:启动系统MyService守护程序:失败!我想这与权限有关,但我不知道如何。.pid文件的权限为-rwxrw-rw-我读了这个https://stackoverflow.com/a/6720364/348