From 50c986aebe957f823e5d3142fded12700863fa0f Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Wed, 18 Oct 2023 21:42:09 -0500 Subject: user/dnsmasq: New package --- user/dnsmasq/dnsmasq.initd | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 user/dnsmasq/dnsmasq.initd (limited to 'user/dnsmasq/dnsmasq.initd') 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 $? +} -- cgit v1.2.3-60-g2f50