2019年12月16日 星期一

Mac Command

launchctl

Basic

launchctl依據plist的設定起動程式

Commands

load read a plist file and schedule a launch
unload stop and unschedule a config file
start start the service, ignore the schedule
stop stop the service, ignore the schedule

restart example

launchctl unload -w ~/Library/LaunchAgents/com.apple.myservice.plist

launchctl load -w ~/Library/LaunchAgents/com.apple.myservice.plist


Unload default apache
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

User defined schedule config
範例

沒有留言:

張貼留言