[MaraDNS list] [PATCH] Provide systemd unit files
Tomasz Torcz
tomek at pipebreaker.pl
Tue Jul 17 07:17:01 EDT 2012
Hi,
Attached patch provides systemd unit files for maradns 2.0.
It was developed against maradns-Q.20120521.1.
Systemd is service management system available in number of distributions,
and will be core part of RHEL7. Thus, future CentOS and similar RH-clones
will also use systemd.
Shipping unit files upstream makes distribution work easier and reduces
differences between various distribution. In case of maradns, it will
also make Duende obsolete. Please apply.
--
Tomasz Torcz Only gods can safely risk perfection,
xmpp: zdzichubg at chrome.pl it's a dangerous thing for a man. -- Alia
-------------- next part --------------
From d82391b6f2c2a3632d3a6bfea91e120d8694bbb4 Mon Sep 17 00:00:00 2001
From: Tomasz Torcz <tomek at pipebreaker.pl>
Date: Mon, 16 Jul 2012 16:04:59 +0200
Subject: [PATCH] add systemd unit files (Fedora 15 and later, RHEL7)
---
build/install.sh | 10 ++++++++++
build/maradns-deadwood.service | 11 +++++++++++
build/maradns-zoneserver.service | 11 +++++++++++
build/maradns.service | 11 +++++++++++
4 files changed, 43 insertions(+)
create mode 100644 build/maradns-deadwood.service
create mode 100644 build/maradns-zoneserver.service
create mode 100644 build/maradns.service
diff --git a/build/install.sh b/build/install.sh
index 2e81170..fabc4f6 100755
--- a/build/install.sh
+++ b/build/install.sh
@@ -211,3 +211,13 @@ if [ -d $RPM_BUILD_ROOT/etc/rc.d/init.d ] ; then
fi
fi
+# copy systemd unit files if systemd is available
+UNITDIR=$( pkg-config --variable=systemdsystemunitdir systemd )
+if [ -d "$UNITDIR" ]; then
+ echo Installing systemd unit files in $UNITDIR
+ cp $BUILDDIR/maradns.service $UNITDIR/maradns.service
+ cp $BUILDDIR/maradns-zoneserver.service $UNITDIR/maradns-zoneserver.service
+ cp $BUILDDIR/maradns-deadwood.service $UNITDIR/maradns-deadwood.service
+fi
+
+
diff --git a/build/maradns-deadwood.service b/build/maradns-deadwood.service
new file mode 100644
index 0000000..db822fb
--- /dev/null
+++ b/build/maradns-deadwood.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=MaraDNS secure Domain Name Server (DNS) recursive resolver
+Documentation=man:Deadwood(1)
+Requires=network.target
+
+[Service]
+ExecStart=/usr/sbin/Deadwood
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/build/maradns-zoneserver.service b/build/maradns-zoneserver.service
new file mode 100644
index 0000000..12ca8f2
--- /dev/null
+++ b/build/maradns-zoneserver.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=MaraDNS Zoneserver handles DNS zone transfers and any TCP DNS queries
+Documentation=man:zoneserver(8)
+Requires=network.target
+
+[Service]
+ExecStart=/usr/sbin/zoneserver -f /etc/mararc
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/build/maradns.service b/build/maradns.service
new file mode 100644
index 0000000..8e3a1ff
--- /dev/null
+++ b/build/maradns.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=MaraDNS secure Domain Name Server (DNS)
+Documentation=man:maradns(8)
+Requires=network.target
+
+[Service]
+ExecStart=/usr/sbin/maradns -f /etc/mararc
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
--
1.7.10.4
More information about the list
mailing list