diff options
| author | Michael Larson <slioch@eng-140.vyatta.com> | 2008-01-30 17:19:15 -0800 |
|---|---|---|
| committer | Michael Larson <slioch@eng-140.vyatta.com> | 2008-01-30 17:19:15 -0800 |
| commit | 07e2dbf1d5a98860333aefa989370305467c2254 (patch) | |
| tree | 99efbe8822ec249b1c8ded9054f4821ec2ca6f37 /scripts | |
| parent | ad4a7086e81292e0aa76b98739356a02ff9873ed (diff) | |
| download | vyatta-wanloadbalance-07e2dbf1d5a98860333aefa989370305467c2254.tar.gz vyatta-wanloadbalance-07e2dbf1d5a98860333aefa989370305467c2254.zip | |
numerous changes: added help, added init script, modified source to support daemon and pid creation, fixed conf file creation when
using cli. postinst. etc.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/vyatta-wanloadbalance.init (renamed from scripts/wlb.init) | 6 | ||||
| -rw-r--r-- | scripts/vyatta-wanloadbalance.pl | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/scripts/wlb.init b/scripts/vyatta-wanloadbalance.init index 60315f4..daf4ee2 100755 --- a/scripts/wlb.init +++ b/scripts/vyatta-wanloadbalance.init @@ -3,6 +3,8 @@ declare progname=${0##*/} declare action=$1; shift +pid_dir=/var/run/vyatta/quagga + conf=$1; shift @@ -12,7 +14,7 @@ running_pid () { pidof $bb | while read pid ; do f=$(tr '\000' '\t' < /proc/$pid/cmdline 2>/dev/null | cut -f2) - if [ "$f" == wlb ] ; then + if [ "$f" == wan_lb ] ; then echo $pid return fi @@ -25,7 +27,7 @@ start () local -i pid=$( running_pid ) [ $pid -ne 0 ] && return - sh -c wlb -f $conf + /opt/vyatta/sbin/wan_lb -f $conf -d -i $pid_dir/wlb.pid } stop () diff --git a/scripts/vyatta-wanloadbalance.pl b/scripts/vyatta-wanloadbalance.pl index c65c1f0..3d59607 100644 --- a/scripts/vyatta-wanloadbalance.pl +++ b/scripts/vyatta-wanloadbalance.pl @@ -175,6 +175,6 @@ unlink($conf_lck_file); #finally kick the process -#system "/etc/init.d/vyatta-wanloadbalance restart"; +system "/etc/init.d/vyatta-wanloadbalance restart $conf_file"; exit 0; |
