diff options
Diffstat (limited to 'Library/Formula/ircd-hybrid.rb')
| -rw-r--r-- | Library/Formula/ircd-hybrid.rb | 67 |
1 files changed, 26 insertions, 41 deletions
diff --git a/Library/Formula/ircd-hybrid.rb b/Library/Formula/ircd-hybrid.rb index f85903526..a533ddd45 100644 --- a/Library/Formula/ircd-hybrid.rb +++ b/Library/Formula/ircd-hybrid.rb @@ -34,50 +34,35 @@ class IrcdHybrid < Formula def caveats; <<-EOS.undent You'll more than likely need to edit the default settings in the config file: #{etc}/ircd.conf - - 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} - - 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} - - Or start manually with: - ircd - - Which will give you a pid you can kill with: - kill pid EOS end - def startup_plist - return <<-EOPLIST -<?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> - <false/> - <key>Label</key> - <string>#{plist_name}</string> - <key>ProgramArguments</key> - <array> - <string>#{HOMEBREW_PREFIX}/sbin/ircd</string> - </array> - <key>RunAtLoad</key> - <true/> - <key>UserName</key> - <string>#{`whoami`.chomp}</string> - <key>WorkingDirectory</key> - <string>#{HOMEBREW_PREFIX}</string> - <key>StandardErrorPath</key> - <string>#{var}/ircd.log</string> -</dict> -</plist> - EOPLIST + plist_options :manual => "ircd" + + 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>KeepAlive</key> + <false/> + <key>Label</key> + <string>#{plist_name}</string> + <key>ProgramArguments</key> + <array> + <string>#{opt_prefix}/sbin/ircd</string> + </array> + <key>RunAtLoad</key> + <true/> + <key>UserName</key> + <string>#{`whoami`.chomp}</string> + <key>WorkingDirectory</key> + <string>#{HOMEBREW_PREFIX}</string> + <key>StandardErrorPath</key> + <string>#{var}/ircd.log</string> + </dict> + </plist> + EOS end end |
