diff options
| author | Lukas Stabe | 2014-08-20 05:13:18 +0200 |
|---|---|---|
| committer | Mike McQuaid | 2014-08-20 12:24:33 +0100 |
| commit | 4307e3064bc1cda4fd5415e05b9076fde309ae55 (patch) | |
| tree | ad14828a98b6eeb6fcc571257ba605c6a4f0ab2d /Library/Formula | |
| parent | 4cec8b3f597eb849f405c5fb56bd7d6d5217ba70 (diff) | |
| download | homebrew-4307e3064bc1cda4fd5415e05b9076fde309ae55.tar.bz2 | |
mpd: provide launchd plist
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/mpd.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Library/Formula/mpd.rb b/Library/Formula/mpd.rb index 9b8d09d6d..527290b07 100644 --- a/Library/Formula/mpd.rb +++ b/Library/Formula/mpd.rb @@ -119,4 +119,33 @@ class Mpd < Formula --enable-soundcloud -> --with-yajl EOS end + + plist_options :manual => "mpd" + + def plist; <<-EOS.undent + <?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>#{plist_name}</string> + <key>WorkingDirectory</key> + <string>#{HOMEBREW_PREFIX}</string> + <key>ProgramArguments</key> + <array> + <string>#{opt_bin}/mpd</string> + <string>--no-daemon</string> + </array> + <key>RunAtLoad</key> + <true/> + <key>KeepAlive</key> + <true/> + <key>StandardErrorPath</key> + <string>#{var}/log/mpd_err.log</string> + <key>StandardOutPath</key> + <string>#{var}/log/mpd.log</string> + </dict> + </plist> + EOS + end end |
