2007年2月1日木曜日

lighttpd.plist for launchd - ハマり中

lighttpd を、自動起動させようと調べていたら、Mac OS X には、どうやら、launchd なるものが導入されたらしく、しかも、XML ライクに設定ができるので、お手軽??な感じらしいが、"man launchd.plist" 英語なのでよくわからない、、とりあえず、既に入っていた設定を参考にしたり Web を参考にしたりで、作ってみたのが、これなのだが、、

<plist version="1.0">
<dict>
<key>Disabled</key>
<true>
<key>GroupName</key>
<string>www</string>
<key>Label</key>
<string>lighttpd</string>
<key>OnDemand</key>
<false>
<key>ProgramArguments</key>
<array>
<string>/opt/local/sbin/lighttpd</string>
<string>-f /opt/local/etc/lighttpd/lighttpd.conf</string>
</array>
<key>UserName</key>
<string>www</string>
</dict>
</plist>

設定をロードさせようとすると、以下のようにエラーになってしまう、、。何故、、、。なんとなく、"setgid(70): Operation not permitted" から想像するに、wwww ユーザになれてないって事なのだろうか??んー、もう少し、いろいろ検証してみる、、、。
% launchctl load -w ./lighttpd.plist
launchctl: CFURLWriteDataAndPropertiesToResource(./lighttpd.plist) failed: -10
launchd[3261]: lighttpd: setgid(70): Operation not permitted
launchd[3260]: lighttpd: exited with exit code: 1
launchd[3260]: lighttpd: respawning too quickly! throttling
launchd[3260]: lighttpd: 9 more failures without living at least 60 seconds will cause job removal
launchd[3260]: lighttpd: will restart in 10 seconds
もっと、すんなり動いてくれるかと思ったのに、、。。残念、、。
どなたか、心優しき人が回答してくれるとありがたい、、、他力本願、、、、。

ちなみに、launchd の設定を、GUI で管理できるツールが、これらしいが、Lingon 使う予定は、今のところ無い、、。

0 件のコメント:

最近の投稿