From a6ceacb7ae980fa50736dcc491c37ccf1efff5cd Mon Sep 17 00:00:00 2001 From: Pacho Ramos Date: Sat, 13 Jul 2013 11:43:26 +0000 Subject: Install unit file (#466158) (Portage version: 2.1.12.11/cvs/Linux x86_64, signed Manifest commit with key A188FBD4) --- net-dns/bind/files/generate-rndc-key.sh | 7 +++++++ net-dns/bind/files/named.conf | 1 + net-dns/bind/files/named.service | 20 ++++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100755 net-dns/bind/files/generate-rndc-key.sh create mode 100644 net-dns/bind/files/named.conf create mode 100644 net-dns/bind/files/named.service (limited to 'net-dns/bind/files') diff --git a/net-dns/bind/files/generate-rndc-key.sh b/net-dns/bind/files/generate-rndc-key.sh new file mode 100755 index 000000000000..8314d77cd68c --- /dev/null +++ b/net-dns/bind/files/generate-rndc-key.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if [ ! -s /etc/bind/rndc.key ]; then + /usr/sbin/rndc-confgen -a > /dev/null 2>&1 || exit 1 + chmod 640 /etc/bind/rndc.key + chown root.named /etc/bind/rndc.key +fi diff --git a/net-dns/bind/files/named.conf b/net-dns/bind/files/named.conf new file mode 100644 index 000000000000..8f896f6b8aa4 --- /dev/null +++ b/net-dns/bind/files/named.conf @@ -0,0 +1 @@ +d /run/named 0755 named root - diff --git a/net-dns/bind/files/named.service b/net-dns/bind/files/named.service new file mode 100644 index 000000000000..5caecd28c44a --- /dev/null +++ b/net-dns/bind/files/named.service @@ -0,0 +1,20 @@ +[Unit] +Description=Berkeley Internet Name Domain (DNS) +After=network.target + +[Service] +Type=forking +EnvironmentFile=/etc/conf.d/named +PIDFile=/var/run/named/named.pid + +ExecStartPre=/usr/libexec/generate-rndc-key.sh +ExecStartPre=/usr/sbin/named-checkconf -z /etc/bind/named.conf +ExecStart=/usr/sbin/named -u named $OPTIONS + +ExecReload=/bin/sh -c '/usr/sbin/rndc reload > /dev/null 2>&1 || /bin/kill -HUP $MAINPID' +ExecStop=/bin/sh -c '/usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID' + +PrivateTmp=true + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3-65-gdbad