From 181b7cc450cc2ad1865d5275a7a2a6b59baf01d2 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Fri, 1 Feb 2008 14:32:25 -0800 Subject: init script fix. set up show commands. create output file for wan lb status and provide show status cmd. --- scripts/vyatta-wanloadbalance.init | 27 --------------------------- scripts/vyatta-wanloadbalance.init.in | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 27 deletions(-) delete mode 100644 scripts/vyatta-wanloadbalance.init create mode 100755 scripts/vyatta-wanloadbalance.init.in (limited to 'scripts') diff --git a/scripts/vyatta-wanloadbalance.init b/scripts/vyatta-wanloadbalance.init deleted file mode 100644 index f2c2c16..0000000 --- a/scripts/vyatta-wanloadbalance.init +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/bash - -declare progname=${0##*/} -declare action=$1; shift - -conf=$1; shift - - -test -x $bb || exit 0 - -start () -{ - /opt/vyatta/sbin/wan_lb -f $conf -d -i /var/run/vyatta/wlb.pid -} - -stop () -{ - kill -s SIGTERM $( cat /var/run/vyatta/wlb.pid ) -} - -case "$action" in - start) start;; - stop) stop;; - restart) stop; sleep 1; start;; - *) echo "Usage: $progname {start|stop|restart}" - exit 1 -esac diff --git a/scripts/vyatta-wanloadbalance.init.in b/scripts/vyatta-wanloadbalance.init.in new file mode 100755 index 0000000..decb811 --- /dev/null +++ b/scripts/vyatta-wanloadbalance.init.in @@ -0,0 +1,30 @@ +#! /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;; + restart) stop; sleep 1; start;; + *) echo "Usage: $progname {start|stop|restart}" + exit 1 +esac -- cgit v1.2.3