mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-19 15:32:59 +02:00
unbound: fix update forwarders if unbound was not running
psgrep has no "-q" switch so i use pidof. Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
@@ -3,10 +3,11 @@
|
||||
# If network has not fully been brought up here, we start unbound
|
||||
# so that all following scripts can rely on DNS resolution
|
||||
|
||||
# Update DNS forwarders if unbound is running
|
||||
if pgrep -q unbound; then
|
||||
exec /etc/init.d/unbound update-forwarders
|
||||
pidof unbound > /dev/null
|
||||
if [ "${?}" = "0" ]; then
|
||||
# unbound is run so update the forwarders
|
||||
/etc/init.d/unbound update-forwarders
|
||||
else
|
||||
# Start unbound if it is not running, yet
|
||||
/etc/init.d/unbound start
|
||||
fi
|
||||
|
||||
# Start unbound if it is not running, yet
|
||||
exec /etc/init.d/unbound start
|
||||
|
||||
Reference in New Issue
Block a user