diff --git a/light.sh b/light.sh index c2cae7d..4ea80c7 100755 --- a/light.sh +++ b/light.sh @@ -98,7 +98,7 @@ case "$ROOM_NUMBER" in DR=$(sign $(($R_-$R))); DG=$(sign $(($G_-$G))); DB=$(sign $(($B_-$B))) R=$(($R+$DR)); G=$((G+$DG)); B=$(($B+$DB)) for i in 5:$R 4:$G 3:$B; do - wget -q -O- http://172.23.92.5/ecmd?channel%20$(echo $i | cut -d: -f1)%20$(echo $i | cut -d: -f2) > /dev/null 2>&1 & + wget -q --timeout 3 -O- http://172.23.92.5/ecmd?channel%20$(echo $i | cut -d: -f1)%20$(echo $i | cut -d: -f2) > /dev/null 2>&1 & COLOR_B_TMP="$(echo "$COLOR_B_TMP" | cut -c3-)" done sleep .1 @@ -109,7 +109,7 @@ case "$ROOM_NUMBER" in else COLOR_B_TMP=$COLOR_B for i in 5 4 3; do - wget -q -O- http://172.23.92.5/ecmd?channel%20$i%20$(printf "%d" "0x${COLOR_B_TMP:0:2}") > /dev/null 2>&1 & + wget -q --timeout 3 -O- http://172.23.92.5/ecmd?channel%20$i%20$(printf "%d" "0x${COLOR_B_TMP:0:2}") > /dev/null 2>&1 & COLOR_B_TMP="$(echo "$COLOR_B_TMP" | cut -c3-)" done fi