diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2009-07-09 18:29:13 -0700 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2009-07-09 18:29:13 -0700 |
commit | 94e3e519ddb67e70e47015fca552fec264039c80 (patch) | |
tree | a9cc1ab2c8703ffc692774d267d7ba7158c650c0 /scripts | |
parent | 33336fff1ce8845fdd39686342975b1349c59467 (diff) | |
parent | 1727949b57428d94569130e84c77a12d7a2a71fb (diff) | |
download | vyatta-cfg-quagga-94e3e519ddb67e70e47015fca552fec264039c80.tar.gz vyatta-cfg-quagga-94e3e519ddb67e70e47015fca552fec264039c80.zip |
Merge branch 'kenwood' of http://git.vyatta.com/vyatta-cfg-quagga into kenwood
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/quagga-manager | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/scripts/quagga-manager b/scripts/quagga-manager index ff0c7f88..be0435b9 100755 --- a/scripts/quagga-manager +++ b/scripts/quagga-manager @@ -15,11 +15,6 @@ if [ $# -lt 1 ]; then usage fi -if [ $EUID -ne 0 ]; then - echo "must be root!" - exit 1 -fi - pid_dir=/var/run/vyatta/quagga log_dir=/var/log/vyatta/quagga @@ -37,15 +32,21 @@ start() { local pidfile=${pid_dir}/${daemon}.pid local binpath=/usr/sbin/vyatta-$daemon + if [ $EUID -ne 0 ]; then + echo "must be root!" + exit 1 + fi + if [ ! -x $binpath ]; then echo "Unknown daemon $daemon" return 1 fi local -a args=( -d -P 0 -i $pidfile ) - if [ "$daemon" = "zebra" ]; then - args+=( -l -S -s 1048576 ) - fi + case $daemon in + zebra) args+=( -l -S -s 1048576 );; + bgpd) args+=( -I );; + esac exec start-stop-daemon --start --oknodo --quiet \ --chdir $log_dir --exec $binpath --pidfile $pidfile \ @@ -57,6 +58,10 @@ stop() { local pidfile=${pid_dir}/${daemon}.pid local binpath=/usr/sbin/vyatta-$daemon + if [ $EUID -ne 0 ]; then + echo "must be root!" + exit 1 + fi start-stop-daemon --stop --quiet --oknodo --retry 5 \ --exec $binpath --pidfile=$pidfile rm -f $pidfile |