summaryrefslogtreecommitdiff
path: root/user/dnsmasq/dnsmasq.initd
diff options
context:
space:
mode:
Diffstat (limited to 'user/dnsmasq/dnsmasq.initd')
-rw-r--r--user/dnsmasq/dnsmasq.initd29
1 files changed, 29 insertions, 0 deletions
diff --git a/user/dnsmasq/dnsmasq.initd b/user/dnsmasq/dnsmasq.initd
new file mode 100644
index 000000000..559cb1e89
--- /dev/null
+++ b/user/dnsmasq/dnsmasq.initd
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload rotate"
+
+pidfile="/var/run/dnsmasq.pid"
+command="/usr/sbin/dnsmasq"
+command_args="-x ${pidfile} ${DNSMASQ_OPTS}"
+retry="TERM/3/TERM/5"
+
+depend() {
+ provide dns
+ need localmount net
+ after bootmisc
+ use logger
+}
+
+reload() {
+ ebegin "Reloading ${RC_SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
+
+rotate() {
+ ebegin "Reopening ${RC_SVCNAME} log file"
+ start-stop-daemon --signal USR2 --pidfile "${pidfile}"
+ eend $?
+}