diff options
author | Michael Larson <slioch@eng-140.vyatta.com> | 2008-02-11 14:04:14 -0800 |
---|---|---|
committer | Michael Larson <slioch@eng-140.vyatta.com> | 2008-02-11 14:04:14 -0800 |
commit | f5997468a4aad5000cde8563ed277edbaf11d70f (patch) | |
tree | 0f40195fd32aa7f0b38519df202ce2de96d52796 /etc | |
parent | 7c3732a035bd65510a2a123687768670fdaea1e4 (diff) | |
download | vyatta-wanloadbalance-f5997468a4aad5000cde8563ed277edbaf11d70f.tar.gz vyatta-wanloadbalance-f5997468a4aad5000cde8563ed277edbaf11d70f.zip |
more cleanup.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/init.d/vyatta-wanloadbalance | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/etc/init.d/vyatta-wanloadbalance b/etc/init.d/vyatta-wanloadbalance new file mode 100644 index 0000000..fb5edcc --- /dev/null +++ b/etc/init.d/vyatta-wanloadbalance @@ -0,0 +1,31 @@ +#! /bin/bash + +declare progname=${0##*/} +declare action=$1; shift + +conf=$1; shift +pid=/var/run/vyatta/wlb.pid + +test -x $bb || exit 0 + +start () +{ + /opt/vyatta/sbin/wan_lb -f $conf -d -i $pid +} + +stop () +{ + if [ -f $pid ] + then + kill -s SIGTERM $( cat $pid ) 2>/dev/null + fi +} + +case "$action" in + start) start;; + stop) stop;; + force-reload) stop; sleep 1; start;; + restart) stop; sleep 1; start;; + *) echo "Usage: $progname {start|stop|restart}" + exit 1 +esac |