Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a sample launchd plist for managing Stallion on Mac OS X

```
~/dev/git-repos/stallion$ python -m stallion.write_plist > pyevolve.stallion.plist
~/dev/git-repos/stallion$ launchctl load -w pyevolve.stallion.plist
~/dev/git-repos/stallion$ pgrep -fl python
36744 /Users/marc/dev/git-repos/stallion/stallion.venv/bin/python -m stallion.main
```
  • Loading branch information...
commit 305765cffc417eba1e2ad37e98c61fee89d80e97 1 parent 3111066
@msabramo authored
Showing with 24 additions and 0 deletions.
  1. +24 −0 stallion/write_plist.py
View
24 stallion/write_plist.py
@@ -0,0 +1,24 @@
+import sys
+
+plist_sample_text="""
+<?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>Label</key>
+ <string>Stallone</string>
+
+ <key>ProgramArguments</key>
+ <array>
+ <string>{python}</string>
+ <string>-m</string>
+ <string>stallion.main</string>
+ </array>
+
+ <key>RunAtLoad</key>
+ <true/>
+</dict>
+</plist>
+""".strip()
+
+sys.stdout.write(plist_sample_text.format(python=sys.executable))
Please sign in to comment.
Something went wrong with that request. Please try again.