2013年8月15日 星期四

How to stop a launchd process

osx 啟動服務都是由 launchd 來管理,

開機時會啟動下列目錄內的 plist
/System/Library/LaunchDaemons
/Library/LaunchDaemons

使用者登入後會啟動下列目錄內的 plist
/System/Library/LaunchAgents
/Library/LaunchAgents
~/Library/LaunchAgents

移除某個 service 可以用 launchctl 來控制 launchd
launchctl list
launchctl remove com.google.keystone.user.agent

這種做法重開機後,就失效,
解決辦法直接編輯 plist 加入
<key>Disabled</key>
<true/>

enjoy it~~

沒有留言:

張貼留言