2 stopfile=/tmp/l2tpns.stop
10 echo "`date`: Starting l2tpns $@"
12 /usr/sbin/l2tpns ${1+"$@"}
15 t=$(($stop - $start));
16 first=$(($stop - $first));
17 echo "`date`: l2tpns exited after $t seconds, status $RETVAL"
18 if [ $first -lt $min_first_time ]; then
19 echo "`date`: l2tpns exited immediately, $prog exiting"
22 if [ -f $stopfile ]; then
24 echo "`date`: stop file found, $prog exiting"
28 done >>/var/log/$prog 2>&1 & # execute in background