diff options
Diffstat (limited to 'Library/Formula/gearman.rb')
| -rw-r--r-- | Library/Formula/gearman.rb | 48 |
1 files changed, 17 insertions, 31 deletions
diff --git a/Library/Formula/gearman.rb b/Library/Formula/gearman.rb index ef6d66c5d..859e83525 100644 --- a/Library/Formula/gearman.rb +++ b/Library/Formula/gearman.rb @@ -15,38 +15,24 @@ class Gearman < Formula system "make install" end - def caveats; <<-EOS.undent - If this is your first install, automatically load on login with: - mkdir -p ~/Library/LaunchAgents - cp #{plist_path} ~/Library/LaunchAgents/ - launchctl load -w ~/Library/LaunchAgents/#{plist_path.basename} + plist_options :manual => "gearmand -d" - If this is an upgrade and you already have the #{plist_path.basename} loaded: - launchctl unload -w ~/Library/LaunchAgents/#{plist_path.basename} - cp #{plist_path} ~/Library/LaunchAgents/ - launchctl load -w ~/Library/LaunchAgents/#{plist_path.basename} - - To start gearmand manually: - gearmand -d + def plist; <<-EOS.undent + <?xml version="1.0" encoding="UTF-8"?> + <!DOCTYPE plist PUBLIC "-//Apple Computer//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>Program</key> + <string>#{opt_prefix}/sbin/gearmand</string> + <key>RunAtLoad</key> + <true/> + <key>UserName</key> + <string>#{`whoami`.chomp}</string> + </dict> + </plist> EOS end - - def startup_plist; <<-EOPLIST -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//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>Program</key> - <string>#{sbin}/gearmand</string> - <key>RunAtLoad</key> - <true/> - <key>UserName</key> - <string>#{`whoami`.chomp}</string> - </dict> -</plist> - EOPLIST - end end |
