aboutsummaryrefslogtreecommitdiff
path: root/contrib/rc_d_unbound
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/rc_d_unbound')
-rwxr-xr-xcontrib/rc_d_unbound9
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/rc_d_unbound b/contrib/rc_d_unbound
index 56516147f230..9d98c5e059ae 100755
--- a/contrib/rc_d_unbound
+++ b/contrib/rc_d_unbound
@@ -22,4 +22,13 @@ pidfile=${unbound_pidfile:-"/usr/local/etc/unbound/unbound.pid"}
command_args=${unbound_flags:-"-c /usr/local/etc/unbound/unbound.conf"}
extra_commands="reload"
+if test "$1" = "stop" ; then
+ run_rc_command "$1"
+ ret=$?
+ if test $ret -eq 0; then
+ rm -f "$pidfile"
+ fi
+ exit $ret
+fi
+
run_rc_command "$1"