]> gitweb.michael.orlitzky.com - mjo-overlay.git/blobdiff - net-dns/rbldnsd/files/initd-0.997
New ebuild: net-dns/rbldnsd-0.997.
[mjo-overlay.git] / net-dns / rbldnsd / files / initd-0.997
diff --git a/net-dns/rbldnsd/files/initd-0.997 b/net-dns/rbldnsd/files/initd-0.997
new file mode 100644 (file)
index 0000000..d7fa999
--- /dev/null
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+    need net
+}
+
+start() {
+    ebegin "Starting rbldnsd"
+
+    # Create -b args from the bash array $LISTEN.
+    local listenopts=""
+    for addr in "${LISTEN[@]}"; do
+       listenopts="${listenopts} -b $addr"
+    done
+
+    start-stop-daemon --start --quiet --pidfile /run/rbldnsd.pid \
+       --exec /usr/sbin/rbldnsd -- \
+       -r /var/db/rbldnsd \
+       -p /run/rbldnsd.pid \
+       $listenopts \
+       ${OPTIONS} \
+       ${ZONES}
+    eend $?
+}
+
+stop() {
+    ebegin "Stopping rbldnsd"
+    start-stop-daemon --stop --quiet --pidfile /run/rbldnsd.pid \
+       --exec /usr/sbin/rbldnsd
+    eend $?
+}