为什么我的 upstart 脚本失败了?

为什么我的 upstart 脚本失败了?

以下是相关脚本:

description "Circuit server"
author      "anonymous"

start on filesystem or runlevel [2345]
stop on shutdown

# Script fails when setuid and setgid are not commented
setuid sentimens
setgid sentimens

script

    echo $$ > /var/run/circuit.pid
    exec /bin/circuit start --docker

end script

pre-start script
    echo "[`date`] Circuit Server Starting" >> /var/log/circuit.log
end script

pre-stop script
    rm /var/run/circuit.pid
    echo "[`date`] Circuit Server Stopping" >> /var/log/circuit.log
end script

setgid随着和行的增加setuid,我无法再启动我的服务:

$ sudo service circuit start
start: Job failed to start

$ init-checkconf /etc/init/circuit.conf 
File /etc/init/circuit.conf: syntax ok

我不知道接下来该怎么做。鉴于这init-checkconf似乎很顺利,导致此错误的可能原因是什么?

相关内容