X-Git-Url: https://git.realraum.at/?p=svn42.git;a=blobdiff_plain;f=powersensordaemon%2Fswitch.cgi;fp=powersensordaemon%2Fswitch.cgi;h=0000000000000000000000000000000000000000;hp=c10c5fabccd9ca3000a4ee7b659b9857e788cf15;hb=ff9137d257207a3a4b03c4f453cc1b7ce1e3cf17;hpb=a34e51d757fe52cb19de2937ae1b211894167524 diff --git a/powersensordaemon/switch.cgi b/powersensordaemon/switch.cgi deleted file mode 100755 index c10c5fa..0000000 --- a/powersensordaemon/switch.cgi +++ /dev/null @@ -1,288 +0,0 @@ -#!/bin/sh - -for QUERY in `echo $QUERY_STRING | tr '&' ' '`; do - for VALUE in `echo $QUERY | tr '=' ' '`; do - if [ "$VALUE" == "id" ]; then - ID='?' - elif [ "$ID" == "?" ]; then - ID=$VALUE - elif [ "$VALUE" == "power" ]; then - POWER='?' - elif [ "$POWER" == "?" ]; then - POWER=$VALUE - elif [ "$VALUE" == "mobile" ]; then - MOBILE='1' - NOFLOAT='1' - elif [ "$VALUE" == "nofloat" ]; then - NOFLOAT='1' - fi - i=$i+1 - done -done - - -UNIXSOCK=/var/run/powersensordaemon/cmd.sock -VALID_ONOFF_IDS="regalleinwand labortisch bluebar couchred couchwhite all lichter ambientlights cxleds mashadecke boiler" -VALID_SEND_IDS_CUSTOM_DISPLAY="ymhpoweroff ymhpower ymhvolup ymhvoldown" -VALID_SEND_IDS="ymhpoweron ymhcd ymhwdtv ymhtuner ymhaux ymhsattv ymhvolmute ymhmenu ymhplus ymhminus ymhtest ymhtimelevel ymheffect ymhprgup ymhprgdown ymhtunplus ymhtunminus ymhtunabcde ymhtape ymhvcr ymhextdec ymhsleep ymhp5 panicled blueled moviemode" -#VALID_BANSHEE_IDS="playPause next prev" -#VALID_CAM_MOTOR_IDS="c C w W" - -[ "$POWER" == "send" ] && POWER=on -if [ "$POWER" == "on" -o "$POWER" == "off" ]; then - for CHECKID in $VALID_ONOFF_IDS $VALID_SEND_IDS $VALID_SEND_IDS_CUSTOM_DISPLAY; do - if [ "$CHECKID" == "$ID" ]; then - echo "power $POWER $ID" | usocket $UNIXSOCK - echo "Content-type: text/html" - echo "" - echo "" - echo "
" - echo "