to github
[svn42.git] / powersensordaemon / lightlevel.cgi
index 0b031af..ff73464 100755 (executable)
@@ -5,8 +5,13 @@ echo "sample photo0" | usocket $UNIXSOCK -n > $TMPFILE &
 PID=$!
 echo "Content-type: text/html"
 echo ""
-while [ ! -s $TMPFILE ]; do 
-       continue
+A=0
+while [ ! -s $TMPFILE ]; do
+       if [ $((A++)) -gt 2000 ]; then
+               break
+       else
+               continue
+       fi
 done
 cat $TMPFILE | cut -d' ' -f 2
 rm $TMPFILE