IPv6: 讓 OS X 開機時自動執行 gw6c

參考來源:個人收藏指令集:gw6c的LaunchDaemons http://cmd.hhmr.biz/2012/11/gw6claunchdaemons.html

建立檔案 /System/Library/LaunchDaemons/gw6c.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>UserName</key>
 <string>root</string>
 <key>GroupName</key>
 <string>wheel</string>
 <key>Label</key>
 <string>gw6c</string>
 <key>ProgramArguments</key>
 <array>
  <string>/usr/local/gw6c/bin/gw6c</string>
  <string>-f</string>
  <string>/usr/local/gw6c/bin/gw6c.conf</string>
 </array>
 <key>RunAtLoad</key>
 <true/>
 <key>OnDemand</key>
 <false/>
 <key>KeepAlive</key>
 <dict>
  <key>SuccessfulExit</key>
  <true/>
  <key>NetworkState</key>
  <true/>
 </dict>
</dict>
</plist>

之後 重新開機 或執行

$ sudo launchctl load /System/Library/LaunchDaemons/gw6c.plist

不過,gw6c 似乎會與 Tunnelblick OpenVPN Client 相衝!?
只要 gw6c 執行中,OpenVPN Client 就無法連接 OpenVPN Server
目前還無對策,只好在需要使用 openvpn 時,先結束 gw6c

$ sudo launchctl unload /System/Library/LaunchDaemons/gw6c.plist

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *