..
authorBernhard Tittelbach <xro@realraum.at>
Tue, 27 Jul 2010 23:42:09 +0000 (23:42 +0000)
committerBernhard Tittelbach <xro@realraum.at>
Tue, 27 Jul 2010 23:42:09 +0000 (23:42 +0000)
powersensordaemon/switch.cgi

index ce97a6c..749300a 100755 (executable)
@@ -20,10 +20,10 @@ VALID_ONOFF_IDS="decke lichter all werkzeug labor dart logo idee deckehinten dec
 VALID_SEND_IDS="stereo ymhvolup ymhvoldown ymhcd ymhwdtv ymhtuner"
 
 
-if [ "$POWER" == "on" -o "$POWER" == "off" -o "$POWER" == "send"]; then
+[ "$POWER" == "send" ] && POWER=on
+if [ "$POWER" == "on" -o "$POWER" == "off" ]; then
   for CHECKID in $VALID_ONOFF_IDS $VALID_SEND_IDS; do 
     if [ "$CHECKID" == "$ID" ]; then
-      [ "$POWER" == "send" ] && POWER=on
       echo "power $POWER $ID" | usocket $UNIXSOCK
       echo "Content-type: text/html"
       echo ""