mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
network: Only try to restart collectd if it is running
This updated version of this script avoids any errors if collectd is not running (yet) which might happen during the boot process. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Restart collectd because the ping plugin does not re-resolve "gateway"
|
||||
exec /etc/init.d/collectd restart
|
||||
if pgrep collectd &>/dev/null; then
|
||||
exec /etc/init.d/collectd restart &>/dev/null
|
||||
fi
|
||||
|
||||
exit 1
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user