Allow service names to be configured.
authorRoy Marples <roy@marples.name>
Thu, 4 Nov 2010 14:42:02 +0000 (14:42 +0000)
committerRoy Marples <roy@marples.name>
Thu, 4 Nov 2010 14:42:02 +0000 (14:42 +0000)
dnsmasq.in
libc.in
named.in
pdns_recursor.in
unbound.in

index 203debbc9aeb6d46675adc441be4d801eb35caca..167886628303c3b46fad54cd739c86442499805b 100644 (file)
@@ -33,7 +33,8 @@
 
 : ${dnsmasq_pid:=/var/run/dnsmasq.pid}
 [ -s "$dnsmasq_pid" ] || dnsmasq_pid=/var/run/dnsmasq/dnsmasq.pid
-: ${dnsmasq_restart:=@RESTARTCMD dnsmasq@}
+: ${dnsmasq_service:=dnsmasq}
+: ${dnsmasq_restart:=@RESTARTCMD ${dnsmasq_service}@}
 newconf="# Generated by resolvconf\n"
 newresolv="$newconf"
 
diff --git a/libc.in b/libc.in
index 577a2f93e0b372af00471fba42412e7eb218d158..4ceb0d2d038fd383f0fee5bbe475f8aa1f2c7e6f 100644 (file)
--- a/libc.in
+++ b/libc.in
@@ -77,7 +77,8 @@ elif [ -d "$SYSCONFDIR"/resolvconf ]; then
        fi
 fi
 : ${resolv_conf:=/etc/resolv.conf}
-: ${libc_restart:=@RESTARTCMD nscd@}
+: ${libc_service:=nscd}
+: ${libc_restart:=@RESTARTCMD ${libc_service}@}
 : ${list_resolv:=@PREFIX@/sbin/resolvconf -l}
 if [ "${resolv_conf_head-x}" = x -a -f "$SYSCONFDIR"/resolv.conf.head ]; then
        resolv_conf_head="$(cat "${SYSCONFDIR}"/resolv.conf.head)"
index 91d6a4b6ad1927440491a7ff8b3c0a89e7a5dca7..dc414600a694828362a347443638739061bdc7c7 100644 (file)
--- a/named.in
+++ b/named.in
@@ -31,7 +31,8 @@
 [ -z "$named_zones" -a -z "$named_options" ] && exit 0
 [ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)"
 
-: ${named_restart:=@RESTARTCMD named@}
+: ${named_service:=named}
+: ${named_restart:=@RESTARTCMD ${named_service}@}
 newoptions="# Generated by resolvconf\n"
 newzones="$newoptions"
 
index 7e7c663b5d499c6340edcceda6c215159e041ecb..93bed04d9fd9a04941649c7d6b1dde0087a35a84 100644 (file)
@@ -31,7 +31,8 @@
 [ -z "$pdns_zones" ] && exit 0
 [ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)"
 
-: ${pdns_restart:=@RESTARTCMD pdns_recursor@}
+: ${pdns_service:=pdns_recursor}
+: ${pdns_restart:=@RESTARTCMD ${pdns_service}@}
 
 newzones=
 
index 6d8547a8877de229ad622f1e5d9e5d893c987a52..b5fb7ecf53401c617060fb7776f0d4602aef6e31 100644 (file)
@@ -32,7 +32,8 @@
 [ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)"
 
 : ${unbound_pid:=/var/run/unbound.pid}
-: ${unbound_restart:=@RESTARTCMD unbound@}
+: ${unbound_service:=unbound}
+: ${unbound_restart:=@RESTARTCMD ${unbound_service}@}
 newconf="# Generated by resolvconf\n"
 
 for d in $DOMAINS; do