Lawrence I. Siden
Lawrence I. Siden

Reputation: 9369

How to use launchctl to reload changes to plist?

On MaxOS I created ~/Library/LaunchAgents/x.plist. Then I loaded it with "launchctl load ..."

I made some edits, unloaded and reloaded it. When I type "launchctl list x" it does not display any of my mods to the plist file.

How can I get launchctl to load my new changes? How is it remembering the first version of this file even after I unloaded it? Does it use a cache?

Upvotes: 9

Views: 7625

Answers (1)

Josep Alsina
Josep Alsina

Reputation: 3027

The quickest way to update is:

# copy the new file to ~/Library/LaunchAgents

launchctl unload ~/Library/LaunchAgents/x.plist
launchctl load   ~/Library/LaunchAgents/x.plist

Upvotes: 10

Related Questions