projects
/
svn42.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
new mode on_with_recap
[svn42.git]
/
powersensordaemon
/
lightlevel.cgi
1
#!/bin/sh
2
UNIXSOCK=/var/run/powersensordaemon/cmd.sock
3
TMPFILE=$(mktemp)
4
echo "sample photo0" | usocket $UNIXSOCK -n > $TMPFILE &
5
PID=$!
6
echo "Content-type: text/html"
7
echo ""
8
A=0
9
while [ ! -s $TMPFILE ]; do
10
if [ $((A++)) -gt 2000 ]; then
11
break
12
else
13
continue
14
fi
15
done
16
cat $TMPFILE | cut -d' ' -f 2
17
rm $TMPFILE
18
kill $PID
19
exit 0