local Proxy sreverのPolipoを64bitで動かすため再コンパイル。
Deamonで動かすためlaunchdを設定。
OSXはinitや/etc/rcではなくlaunchdを使う様だ。
このページを参考にpolipo.plistを作成。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>Polipo</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/polipo</string>
<string>daemonise=true</string>
<string>logFile="/var/log/polipo.log"</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
これを、/Library/LaunchDaemons/の下に置き(root:wheel)、root権限で
launchctl load /Library/LaunchDaemons/polipo.plist
とする。
RunAtLoad trueなので読み込みと同時に開始。
たまに落ちている様だが、KeepAlive trueなので自動で復帰する。まずはOkかな。
しばらく使ってみてどうするかは決定。
コメントする