0
目前我使用永遠我開始aGhost NPM服務器和LaunchAgentOSX launchctl,如何在卸載停止作業
<?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>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>Label</key>
<string>rhino.forever.ghost</string>
<key>ProgramArguments</key>
<array>
<string>..../bin/node</string>
<string>..../bin/forever</string>
<string>start</string
<string>-w</string>
<string>..../index.js</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
與啓動它:
launchctl load -w ~/Library/LaunchAgents/rhino.forever.ghost.plist
但它不會在卸載時停止它:
launchctl unload ~/Library/LaunchAgents/rhino.forever.ghost.plist
是否有任何阻止它卸載時?
感謝您的意見
您是否收到任何錯誤? –
不,但我解決了使用bash別名啓動/重新啓動/停止它,請參閱我的答案 – erwin