Revision
74713
Author
snc@macports.org
Date
2010-12-30 06:40:12 -0800 (Thu, 30 Dec 2010)

Log Message

unbound: PID file must exist, #27818

Modified Paths

Diff

Modified: trunk/dports/net/unbound/Portfile (74712 => 74713)


--- trunk/dports/net/unbound/Portfile	2010-12-30 14:27:19 UTC (rev 74712)
+++ trunk/dports/net/unbound/Portfile	2010-12-30 14:40:12 UTC (rev 74713)
@@ -5,6 +5,7 @@
 
 name                unbound
 version             1.4.7
+revision            1
 categories          net
 conflicts           ldns
 license             BSD
@@ -42,14 +43,17 @@
     adduser ${unbounduser} shell=/sbin/nologin gid=${gid} \
         home=/dev/null \
         realname=Unbound\ Resolver
+    xinstall -o ${unbounduser} -g ${unboundgroup} -m 755 -d ${destroot}${prefix}/var/run/${name}
     move ${destroot}${prefix}/etc/${name}/${name}.conf ${destroot}${prefix}/etc/${name}/${name}.conf-dist
+    touch ${destroot}${prefix}/var/run/${name}/${name}.pid
+    file attributes ${destroot}${prefix}/var/run/${name}/${name}.pid -owner ${unbounduser}
 }
 
 # Make it run on boot
 startupitem.create  yes
 startupitem.name    unbound
 startupitem.start   ${prefix}/sbin/unbound
-startupitem.stop    "/bin/kill \$(cat ${prefix}/etc/unbound/unbound.pid)"
+startupitem.stop    "/bin/kill \$(cat ${prefix}/var/run/unbound/unbound.pid)"
 
 livecheck.type      regex
 livecheck.url       ${homepage}/download.html