saltstack/salt — pull request #1355 by msabramo (2012-05-29 18:38:19+00:00)
Title: Add scripts/salt-write-launchd-plist.py

This is experimental and I am open to ideas for improvements.

This adds a new script that aids in generating plist files for running `salt-master` and `salt-minion` with Mac OS X's [launchd](http://en.wikipedia.org/wiki/Launchd) process manager.

Sample usage:

```
$ scripts/salt-write-launchd-plist.py salt-minion | sudo tee /Library/LaunchDaemons/org.saltstack.salt-minion.plist

Label
org.saltstack.salt-minion

ProgramArguments

/Users/marca/dev/git-repos/salt/salt-virtualenv/bin/python
/Users/marca/dev/git-repos/salt/salt-virtualenv/bin/salt-minion

RunAtLoad

$ sudo launchctl load -w /Library/LaunchDaemons/org.saltstack.salt-minion.plist

$ python scripts/salt-write-launchd-plist.py salt-master | sudo tee /Library/LaunchDaemons/org.saltstack.salt-master.plist

Label
org.saltstack.salt-master

ProgramArguments

/Users/marca/dev/git-repos/salt/salt-virtualenv/bin/python
/Users/marca/dev/git-repos/salt/salt-virtualenv/bin/salt-master

RunAtLoad

$ sudo launchctl load -w /Library/LaunchDaemons/org.saltstack.salt-master.plist

$ sudo launchctl list | grep salt
59935	-	org.saltstack.salt-master
59340	-	org.saltstack.salt-minion
```

Along these lines, it might be an interesting future addition to add a similar script for generating files for [supervisord](http://supervisord.org/)