diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-02-18 12:54:35 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-02-18 15:40:25 -0800 |
commit | 358846aef34e08817dbc7d7eefcffb2f075f786b (patch) | |
tree | 6ef2c5a65fcaec19ea6035efadccd1390b732e7d /scripts/vyatta-protocol | |
parent | 5205f4cd0d68a78c86fce6588f9c276861bb9cdd (diff) | |
download | vyatta-cfg-quagga-358846aef34e08817dbc7d7eefcffb2f075f786b.tar.gz vyatta-cfg-quagga-358846aef34e08817dbc7d7eefcffb2f075f786b.zip |
Rework of protocol startup
Use scripts to do start/stop (instead of disable template).
Integrate reload into new quagga-manager script
Diffstat (limited to 'scripts/vyatta-protocol')
-rwxr-xr-x | scripts/vyatta-protocol | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/scripts/vyatta-protocol b/scripts/vyatta-protocol deleted file mode 100755 index 65ee3d76..00000000 --- a/scripts/vyatta-protocol +++ /dev/null @@ -1,66 +0,0 @@ -#! /bin/bash -# -# This is special script for start,stop,restart of quagga daemons -# -progname=$0 -usage() { - echo "Usage: $progname {start|stop|restart} {bgpd|ospfd|ripd|ripngd}" - exit 1 -} - -if [ $# -lt 2 ]; then - usage -fi - - -daemon=$2 -exe_file=/usr/sbin/vyatta-$daemon - -pid_dir=/var/run/vyatta/quagga -pid_file=$pid_dir/${daemon}.pid -log_dir=/var/log/vyatta/quagga - -if [ ! -x $exe_file ]; then - echo "Unknown daemon $daemon" - exit 1 -fi - -if [ $EUID -ne 0 ]; then - echo "must be root!" - exit 1 -fi - -case "$1" in - start) - start-stop-daemon --start --quiet \ - --chdir $log_dir --exec $exe_file \ - -- -d -P 0 -i $pid_dir/${daemon}.pid - start-stop-daemon --start --quiet \ - --chdir $log_dir \ - --exec /usr/sbin/vyatta-watchquagga \ - -- -p $pid_dir/watch-${daemon}.pid \ - -dz -r "$0 restart %s" $daemon - ;; - - stop) - start-stop-daemon --stop --quiet --oknodo --retry 2 \ - --pidfile $pid_dir/watch-${daemon}.pid - rm -f $pid_dir/watch-${daemon}.pid - start-stop-daemon --stop --quiet --oknodo --retry 2 \ - --exec $exe_file - rm -f $pid_dir/${daemon}.pid - ;; - - restart) - # Restart daemon - start-stop-daemon --stop --quiet --oknodo --exec $exe_file - start-stop-daemon --start --quiet \ - --chdir $log_dir --exec $exe_file \ - -- -d -P 0 -i $pid_dir/${daemon}.pid - - sudo /opt/vyatta/sbin/vyatta-reload-proto-config ${daemon/%d/} - ;; - *) - usage;; -esac - |