Skip to content

Commit

Permalink
Create k1-s.cgi
Browse files Browse the repository at this point in the history
  • Loading branch information
horiq-asm authored Feb 14, 2024
1 parent 361ce6b commit f534978
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions k1-s.cgi
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
echo "Content-type:text/html"
echo ""

echo "<html>"
echo "<head>"
echo "<meta charset=\"utf-8\"/>"
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"/rq/apple-watch.css\">"
echo "</head>"
echo "<body>"
echo "<p id=\"p1\">"
#ip n | grep 00:1e:5e:02:6b:68 | cut -f 1 -d " " >RED_DOOR
if [ `/usr/lib/cgi-bin/k1-status.py | grep -c 1800131` = 1 ]; then
echo "<span style=\"color:#FF0000;\">開錠中</span>"
else
echo "<span style=\"color:#00FF00;\">施錠中</span>"
fi
echo "</p>"
echo "</body>"
echo "</html>"

0 comments on commit f534978

Please sign in to comment.