2
Upstart:非特権ユーザーとしてサービスを実行し、ルートとして事前起動スクリプトを実行します
私は次のアップスタートジョブがあります。 description "posty api" start on mysql stop on shutdown env RACK_ENV=production setuid vmail setgid vmail chdir /opt/posty_api pre-start script mkdir -p /var/run/posty chown -R vmail:root /var/run/posty end script exec /usr/local/bin/unicorn -D -c /opt/posty_api/unicorn.rb --env production >> /var/log/posty/upstart.log 2>&1 post-stop exec kill `cat /var/run/posty/unicorn.pid` respawn respawn limit 1 10 フォルダを作成するには、/var/runroot権限が必要です。どうすればアップスタートジョブの一部をrootとして実行でき、サービス自体を非特権ユーザーとして実行できますか?