diff options
author | Michael Larson <slioch@eng-140.vyatta.com> | 2008-01-31 14:50:57 -0800 |
---|---|---|
committer | Michael Larson <slioch@eng-140.vyatta.com> | 2008-01-31 14:50:57 -0800 |
commit | 1b4349fce41b93bc5965c39d1a9a33279a3ddfbb (patch) | |
tree | 39b88d1fa5443e2ba1feb0c26e6ba8c0b65aba8e /scripts | |
parent | 07e2dbf1d5a98860333aefa989370305467c2254 (diff) | |
download | vyatta-wanloadbalance-1b4349fce41b93bc5965c39d1a9a33279a3ddfbb.tar.gz vyatta-wanloadbalance-1b4349fce41b93bc5965c39d1a9a33279a3ddfbb.zip |
moved most stdout messages to new debug output command. reworked (simplified) init script so that rules table is properly cleaned
up on exit of wlb. fixed a couple cli structural related issues.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-wanloadbalance.init | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/scripts/vyatta-wanloadbalance.init b/scripts/vyatta-wanloadbalance.init index daf4ee2..f2c2c16 100755 --- a/scripts/vyatta-wanloadbalance.init +++ b/scripts/vyatta-wanloadbalance.init @@ -3,37 +3,19 @@ declare progname=${0##*/} declare action=$1; shift -pid_dir=/var/run/vyatta/quagga - conf=$1; shift test -x $bb || exit 0 -running_pid () -{ - pidof $bb | while read pid ; do - f=$(tr '\000' '\t' < /proc/$pid/cmdline 2>/dev/null | cut -f2) - if [ "$f" == wan_lb ] ; then - echo $pid - return - fi - done - false -} - start () { - local -i pid=$( running_pid ) - - [ $pid -ne 0 ] && return - /opt/vyatta/sbin/wan_lb -f $conf -d -i $pid_dir/wlb.pid + /opt/vyatta/sbin/wan_lb -f $conf -d -i /var/run/vyatta/wlb.pid } stop () { - local -i pid=$( running_pid ) - [ $pid -ne 0 ] && kill $pid + kill -s SIGTERM $( cat /var/run/vyatta/wlb.pid ) } case "$action" in |