From: Brian Flowers Date: Mon, 19 Sep 2016 18:06:36 +0000 (-0400) Subject: additional bugfixes for last few commits X-Git-Url: http://git.slightlycyberpunk.com%2C%20git.slightlycyberpunk.com/git/?a=commitdiff_plain;h=1e2c54aede5767bbd2df4ae448cfe8cbf501a826;p=bdsm.git additional bugfixes for last few commits --- diff --git a/bdsm.d/df.generic b/bdsm.d/df.generic index edcdea5..5c628fd 100755 --- a/bdsm.d/df.generic +++ b/bdsm.d/df.generic @@ -66,10 +66,10 @@ start() fi ssh -q $HOSTNAME <> $OUTPATH + nohup stdbuf -o0 echo "\$ts|$HOSTNAME|DISK-$LABEL-USED|\$df" >> $OUTPATH sleep $DELAY done & EOF diff --git a/bdsm.d/sensors.generic b/bdsm.d/sensors.generic index f9290d0..3be2098 100755 --- a/bdsm.d/sensors.generic +++ b/bdsm.d/sensors.generic @@ -62,12 +62,12 @@ start() fi ssh -q $HOSTNAME < /home/bdsm/in.fifo & + ssh -q $host "cat /home/bdsm/out.fifo" > /home/bdsm/in.fifo & echo $! > /home/bdsm/pids/$host.in j=0 while read -u10 line; do command=`echo $line | cut -d' ' -f1` + if [ "$command" == "" ]; then + continue + fi args="`echo $line | cut -d' ' -f2-`" if [ -f /home/bdsm/bdsm.d/$command.$type ]; then /home/bdsm/bdsm.d/$command.$type start $host $args @@ -207,6 +210,9 @@ stop() j=0 echo $functions | tr ';' '\n' | sed 's/[(),]/ /g' | while read line; do command=`echo $line | cut -d' ' -f1` + if [ "$command" == "" ]; then + continue + fi args="`echo $line | cut -d' ' -f2-`" if [ -f /home/bdsm/bdsm.d/$command.$type ]; then /home/bdsm/bdsm.d/$command.$type stop $host $args