Skip to content

Instantly share code, notes, and snippets.

@tristan-k
Forked from elmodaddyb/gerbera.io.plist
Created May 29, 2017 07:21
Show Gist options
  • Save tristan-k/74a6489a3213c7986344dd0e743171a3 to your computer and use it in GitHub Desktop.
Save tristan-k/74a6489a3213c7986344dd0e743171a3 to your computer and use it in GitHub Desktop.
Gerbera OSX Launchd
<?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>Disabled</key>
<false/>
<key>Label</key>
<string>gerbera.io</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/gerbera</string>
<string>--home</string>
<string>/your/gerbera/home</string>
<string>--config</string>
<string>/your/gerbera/config.xml</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/your/gerbera/home/std.out</string>
<key>StandardErrorPath</key>
<string>/your/gerbera/home/std.err</string>
</dict>
</plist>

Create new Launch Agent

^^^^ SEE ABOVE ^^^^

Save Launch Agent

Save to user's launch agent path -->

~/Library/LaunchAgents/gerbera.io.plist

Load the Launch Agent

$ launchctl load ~/Library/LaunchAgents/gerbera.io.plist

Start the Launch Agent

$ launchctl start gerbera.io

Stop the Launch Agent

$ launchctl stop gerbera.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment