]> granicus.if.org Git - pdns/commitdiff
recursor: Add multi-instance unit-file
authorPieter Lexis <pieter.lexis@powerdns.com>
Wed, 1 Jun 2016 13:34:05 +0000 (15:34 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 1 Jun 2016 13:34:05 +0000 (15:34 +0200)
Closes #3922

build-scripts/build-recursor-debian
build-scripts/build-recursor-rpm
build-scripts/debian-recursor/pdns-recursor.install
pdns/recursordist/.gitignore
pdns/recursordist/Makefile.am

index 25e4cb7c25538ded4fb11d66385a219da4198d74..1e61033a51ac80593482ef13aa313692caf66963 100755 (executable)
@@ -44,7 +44,7 @@ export ID="${ID}"
 export VERSION_ID="${VERSION_ID}"
 
 if [ ${ID} = "ubuntu" -a ${VERSION_ID} = "14.04" ]; then
-  sed -i '/lib\/systemd\/system\/pdns-recursor\.service/d' debian/pdns-recursor.install
+  sed -i '/lib\/systemd\/system\/pdns-recursor@\?\.service/d' debian/pdns-recursor.install
 fi
 
 fakeroot debian/rules debian/control
index d9907108c48b36aba1c36da11e5ae1892fe78ae5..4e4ac0410f1e56d475836cdf2c53bbac0c4e178d 100755 (executable)
@@ -283,6 +283,7 @@ exit 0
 %{_mandir}/man1/pdns_recursor.1.gz
 %{_mandir}/man1/rec_control.1.gz
 %{_unitdir}/pdns-recursor.service
+%{_unitdir}/pdns-recursor@.service
 %dir %{_sysconfdir}/%{name}
 %config(noreplace) %{_sysconfdir}/%{name}/recursor.conf
 %doc COPYING README
index f43716fb986e3934fd7d84403935fd69fc66d518..e202ebb4d219f0d5831bd30470f706a3b201ada5 100644 (file)
@@ -1,3 +1,4 @@
 debian/tmp/usr/sbin/pdns_recursor usr/sbin/
 debian/tmp/usr/bin/rec_control usr/bin/
 lib/systemd/system/pdns-recursor.service lib/systemd/system/
+lib/systemd/system/pdns-recursor@.service lib/systemd/system/
index cc7d9da8aed235cd90d4e215153e34da75d9401f..9d26984e896f04e72bd7df9ef0f20d4833d9d402 100644 (file)
@@ -39,3 +39,4 @@
 /dnsmessage.pb.cc
 /dnsmessage.pb.h
 /pdns-recursor.service
+/pdns-recursor@.service
index 8192a3c6d342de27d083a661e8ee7f5f098265f5..3d3dd22a43ac5b074db3a53b1e1cd885c5d6afd2 100644 (file)
@@ -239,8 +239,14 @@ if HAVE_SYSTEMD
 pdns-recursor.service: pdns-recursor.service.in
        $(AM_V_GEN)sed -e 's![@]sbindir[@]!$(sbindir)!' < $< > $@
 
+pdns-recursor@.service: pdns-recursor.service
+       $(AM_V_GEN)sed -e 's!/pdns_recursor!& --config-name=%i!' \
+         -e 's!Recursor!& %i!' \
+         < $< > $@
+
 systemdsystemunitdir = $(SYSTEMD_DIR)
 
 systemdsystemunit_DATA = \
-       pdns-recursor.service
+       pdns-recursor.service \
+       pdns-recursor@.service
 endif