Created
April 14, 2016 01:11
-
-
Save oogali/126311dd4552426a47b20b6049919369 to your computer and use it in GitHub Desktop.
Running services in your dev environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install daemontools | |
sudo mkdir /service /var/service | |
sudo chown $USER /service /var/service | |
cat <<EOF> ~/Library/LaunchAgents/homebrew.mxcl.daemontools.plist | |
<?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>KeepAlive</key> | |
<dict> | |
<key>SuccessfulExit</key> | |
<false/> | |
</dict> | |
<key>Label</key> | |
<string>homebrew.mxcl.daemontools</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/svscanboot</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>WorkingDirectory</key> | |
<string>/</string> | |
<key>StandardErrorPath</key> | |
<string>/usr/local/var/log/daemontools.log</string> | |
<key>StandardOutPath</key> | |
<string>/usr/local/var/log/daemontools.log</string> | |
</dict> | |
</plist> | |
EOF | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment