Skip to content

Commit

Permalink
Merge pull request #917 from vktg/bindcleanshutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
rbgarga committed Aug 19, 2020
2 parents 4ec7625 + 040d87a commit cfdb6e7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dns/pfSense-pkg-bind/files/usr/local/pkg/bind.inc
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,9 @@ function bind_write_rcfile() {
fi
EOD;
$rc['stop'] = <<<EOD
{$BIND_LOCALBASE}/sbin/rndc -q -c "{$BIND_LOCALBASE}/etc/rndc.conf" sync -clean 2>/dev/null
{$BIND_LOCALBASE}/sbin/rndc -q -c "{$BIND_LOCALBASE}/etc/rndc.conf" stop -clean 2>/dev/null
sleep 5
/usr/bin/killall -TERM named 2>/dev/null
sleep 2
EOD;
Expand All @@ -913,8 +916,11 @@ EOD;
if [ -z "`/bin/ps auxw | /usr/bin/grep "[n]amed " | /usr/bin/awk '{print $2}'`" ]; then
{$BIND_LOCALBASE}/sbin/named {$ip_version} -c /etc/namedb/named.conf -u bind -t /cf/named/
else
{$BIND_LOCALBASE}/sbin/rndc -q -c "{$BIND_LOCALBASE}/etc/rndc.conf" sync -clean 2>/dev/null
{$BIND_LOCALBASE}/sbin/rndc -q -c "{$BIND_LOCALBASE}/etc/rndc.conf" stop -clean 2>/dev/null
sleep 5
/usr/bin/killall -TERM named 2>/dev/null
sleep 3
sleep 3
{$BIND_LOCALBASE}/sbin/named {$ip_version} -c /etc/namedb/named.conf -u bind -t /cf/named/
fi
EOD;
Expand Down

0 comments on commit cfdb6e7

Please sign in to comment.