From: Nathaniel Roach <nroach44@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] bind: Add systemd unit file and install it to run at startup.
Date: Sun, 11 Jan 2015 13:31:36 +0800 [thread overview]
Message-ID: <1420954296-27101-3-git-send-email-nroach44@gmail.com> (raw)
In-Reply-To: <1420954296-27101-1-git-send-email-nroach44@gmail.com>
The unit file is taken from debian, but tested working.
We'll call it named.service to match the sysV initscript.
Signed-off-by: Nathaniel Roach <nroach44@gmail.com>
---
package/bind/bind.mk | 9 +++++++++
package/bind/named.service | 12 ++++++++++++
2 files changed, 21 insertions(+)
create mode 100644 package/bind/named.service
diff --git a/package/bind/bind.mk b/package/bind/bind.mk
index 983fa20..a98a4c4 100644
--- a/package/bind/bind.mk
+++ b/package/bind/bind.mk
@@ -82,6 +82,15 @@ define BIND_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/bind/S81named \
$(TARGET_DIR)/etc/init.d/S81named
endef
+define BIND_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -D -m 644 package/bind/named.service \
+ $(TARGET_DIR)/usr/lib/systemd/system/named.service
+
+ mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+
+ ln -sf /usr/lib/systemd/system/named.service \
+ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/named.service
+endef
else
BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_REMOVE_SERVER
endif
diff --git a/package/bind/named.service b/package/bind/named.service
new file mode 100644
index 0000000..be0158b
--- /dev/null
+++ b/package/bind/named.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=BIND Domain Name Server
+Documentation=man:named(8)
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/named -f -u named
+ExecReload=/usr/sbin/rndc reload
+ExecStop=/usr/sbin/rndc stop
+
+[Install]
+WantedBy=multi-user.target
--
2.1.4
next prev parent reply other threads:[~2015-01-11 5:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-11 5:31 [Buildroot] [PATCH] bandwidthd: Add systemd unit file and install it to run at startup Nathaniel Roach
2015-01-11 5:31 ` [Buildroot] [PATCH] postgresql: bump version to 9.4.0 Nathaniel Roach
2015-01-12 11:37 ` Thomas Petazzoni
2015-01-11 5:31 ` Nathaniel Roach [this message]
2015-01-12 21:22 ` [Buildroot] [PATCH] bind: Add systemd unit file and install it to run at startup Thomas Petazzoni
2015-01-11 19:45 ` [Buildroot] [PATCH] bandwidthd: " Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1420954296-27101-3-git-send-email-nroach44@gmail.com \
--to=nroach44@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.