diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-dns/dnsmasq/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-dns/dnsmasq/files')
-rw-r--r-- | net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1 | 29 | ||||
-rw-r--r-- | net-dns/dnsmasq/files/dnsmasq-init-dhcp-r2 | 29 | ||||
-rw-r--r-- | net-dns/dnsmasq/files/dnsmasq-init-r2 | 23 | ||||
-rw-r--r-- | net-dns/dnsmasq/files/dnsmasq-init-r3 | 23 | ||||
-rw-r--r-- | net-dns/dnsmasq/files/dnsmasq.confd-r1 | 4 | ||||
-rw-r--r-- | net-dns/dnsmasq/files/dnsmasq.service-r1 | 12 |
6 files changed, 120 insertions, 0 deletions
diff --git a/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1 b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1 new file mode 100644 index 000000000000..b62630f7140b --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1 @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="reload" + +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 +} + +start_pre() { + checkpath --owner dnsmasq:dnsmasq \ + --mode 0644 \ + --file /var/lib/misc/dnsmasq.leases +} + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + kill -HUP "$(cat "${pidfile}")" + eend $? +} diff --git a/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r2 b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r2 new file mode 100644 index 000000000000..610ce7a5d2e1 --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r2 @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="reload" + +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 +} + +start_pre() { + checkpath --owner dnsmasq:dnsmasq \ + --mode 0644 \ + --file /var/lib/misc/dnsmasq.leases +} + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} diff --git a/net-dns/dnsmasq/files/dnsmasq-init-r2 b/net-dns/dnsmasq/files/dnsmasq-init-r2 new file mode 100644 index 000000000000..ed487b9fd1bb --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq-init-r2 @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="reload" + +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 ${SVCNAME}" + kill -HUP $(cat "${pidfile}") + eend $? +} diff --git a/net-dns/dnsmasq/files/dnsmasq-init-r3 b/net-dns/dnsmasq/files/dnsmasq-init-r3 new file mode 100644 index 000000000000..9d58b26fa5ee --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq-init-r3 @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="reload" + +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 ${SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} diff --git a/net-dns/dnsmasq/files/dnsmasq.confd-r1 b/net-dns/dnsmasq/files/dnsmasq.confd-r1 new file mode 100644 index 000000000000..0e94463074c9 --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq.confd-r1 @@ -0,0 +1,4 @@ +# /etc/conf.d/dnsmasq: config file for /etc/init.d/dnsmasq + +# See the dnsmasq(8) man page for possible options to put here. +DNSMASQ_OPTS="--user=dnsmasq --group=dnsmasq" diff --git a/net-dns/dnsmasq/files/dnsmasq.service-r1 b/net-dns/dnsmasq/files/dnsmasq.service-r1 new file mode 100644 index 000000000000..8e313bcfd996 --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq.service-r1 @@ -0,0 +1,12 @@ +[Unit] +Description=A lightweight DHCP and caching DNS server +After=network.target + +[Service] +Type=simple +ExecStartPre=/usr/sbin/dnsmasq --test +ExecStart=/usr/sbin/dnsmasq -k --user=dnsmasq --group=dnsmasq +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target |