Permalink
Browse files

pdns: add plist

add launchd init script for running pdns as a daemon

Closes #4428.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
  • Loading branch information...
opteryxl authored and dunn committed Sep 2, 2016
1 parent 3f5886c commit c417c422bd9e881b424ca17d0a326c570657fa03
Showing with 25 additions and 0 deletions.
  1. +25 −0 Formula/pdns.rb
View
@@ -54,6 +54,31 @@ def install
system "make", "install"
end
plist_options :manual => "pdns_server start"
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>
<true/>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_bin}/pdns_server</string>
</array>
<key>EnvironmentVariables</key>
<key>KeepAlive</key>
<true/>
<key>SHAuthorizationRight</key>
<string>system.preferences</string>
</dict>
</plist>
EOS
end
test do
output = shell_output("#{sbin}/pdns_server --version 2>&1", 99)
assert_match "PowerDNS Authoritative Server #{version}", output

0 comments on commit c417c42

Please sign in to comment.