From e1ec0766e6508ed2728f3b98c8a5944e551f1dc8213c07a8338db6916b3b7dfa Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Mon, 1 Feb 2010 19:52:34 +0000 Subject: [PATCH] - use the pid when sending signnals to nsd OBS-URL: https://build.opensuse.org/package/show/server:dns/nsd?expand=0&rev=12 --- nsd.changes | 5 +++++ nsd.init | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/nsd.changes b/nsd.changes index 61573e5..4d8b2f9 100644 --- a/nsd.changes +++ b/nsd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 1 19:51:54 UTC 2010 - mrueckert@suse.de + +- use the pid when sending signnals to nsd + ------------------------------------------------------------------- Thu Mar 29 17:16:54 CEST 2007 - mrueckert@suse.de diff --git a/nsd.init b/nsd.init index 6c24dfe..6f2c406 100644 --- a/nsd.init +++ b/nsd.init @@ -130,6 +130,8 @@ test -x $NSD_BIN || { echo "$NSD_BIN not installed"; # if [ "$1" = "stop" ]; then exit 0; # else exit 6; fi; } +NSD_PID="/var/lib/nsd/var/run/nsd.pid" + # Read config # . $NSD_CONFIG @@ -189,7 +191,7 @@ case "$1" in ## Stop daemon with killproc(8) and if this fails ## killproc sets the return value according to LSB. - killproc -TERM $NSD_BIN + killproc -p $NSD_PID -TERM $NSD_BIN # Remember status and be verbose rc_status -v @@ -226,7 +228,7 @@ case "$1" in echo -n "Reload service nsd " ## if it supports it: - killproc -HUP $NSD_BIN + killproc -p $NSD_PID -HUP $NSD_BIN #touch /var/run/nsd.pid rc_status -v @@ -240,7 +242,7 @@ case "$1" in # If it supports signaling: echo -n "Reload service nsd " - killproc -HUP $NSD_BIN + killproc -p $NSD_PID -HUP $NSD_BIN #touch /var/run/nsd.pid rc_status -v @@ -272,7 +274,7 @@ case "$1" in ## argument to this init script which is required for a reload. ## Note: probe is not (yet) part of LSB (as of 1.9) - test /etc/nsd/nsd.conf -nt /var/run/nsd.pid && echo reload + test /etc/nsd/nsd.conf -nt $NSD_PID && echo reload ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"