其實也不難,只是要翻一下文件跟範例,有需要的就笑納吧。
新增 /Library/LaunchDaemons/vs-mda-remote.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>Label</key><string>VsMdaAgent</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/node</string>
<string>/usr/local/bin/vs-mda-remote</string>
<string>--secure</string>
<string>false</string>
<string>--serverDir</string>
<string>/Users/VsMdaAgent/remote-builds/builds</string>
</array>
<key>KeepAlive</key><true>
<key>LaunchOnlyOnce</key><true>
<key>UserName</key><string>VsMdaAgent</string>
</dict>
</plist>
然後測試一下:
啟動 launchctl load -F /Library/LaunchDaemons/tw.com.skymirror.vs-mda-remote.plist 停止 launchctl load -F /Library/LaunchDaemons/tw.com.skymirror.vs-mda-remote.plist看一下 /var/log/system.log 有沒有錯誤訊息,然後 netstat -an |grep 3000 看有沒有跑起來。重開看看運作正不正常。
沒有留言:
張貼留言