diff options
Diffstat (limited to 'scripts/quagga-manager')
-rwxr-xr-x | scripts/quagga-manager | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/quagga-manager b/scripts/quagga-manager index c97b5ede..e7b5d5ae 100755 --- a/scripts/quagga-manager +++ b/scripts/quagga-manager @@ -7,7 +7,7 @@ #echo $* | logger -p local7.debug -t quagga-manager usage() { - echo "Usage: $0 {start|stop|restart} {bgpd|ospfd|ripd|ripngd}" + echo "Usage: $0 {check|start|stop|restart} {bgpd|ospfd|ripd|ripngd}" exit 1 } @@ -23,6 +23,11 @@ fi pid_dir=/var/run/vyatta/quagga log_dir=/var/log/vyatta/quagga +check() { + local daemon=$1 + [ -f ${pid_dir}/${daemon}.pid ] || start $daemon +} + start() { local daemon=$1 local exe_file=/usr/sbin/vyatta-$daemon @@ -123,6 +128,7 @@ update() { case "$1" in + check) check $2;; start) start $2;; stop) stop $2;; update) update;; |