Added cgi-bin scripts to refresh_sd and (not yet finished) delete files.
This commit is contained in:
parent
8b236da7d7
commit
9e4e34e8da
5
.wifisd/cgi-bin/refresh_sd
Normal file
5
.wifisd/cgi-bin/refresh_sd
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
echo "Status: 200 OK"
|
||||||
|
echo "Content-Type: text/plain"
|
||||||
|
echo ""
|
||||||
|
refresh_sd
|
21
.wifisd/cgi-bin/wifi_delete
Normal file
21
.wifisd/cgi-bin/wifi_delete
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
FILE="/mnt/sd/${QUERY_STRING}"
|
||||||
|
|
||||||
|
if [ -f "$FILE" ]; then
|
||||||
|
#rm -f ${FILE}
|
||||||
|
#sync
|
||||||
|
#refresh_sd
|
||||||
|
echo "Status: 200 OK"
|
||||||
|
echo "Content-Type: text/plain"
|
||||||
|
echo ""
|
||||||
|
echo "File to delete: $FILE"
|
||||||
|
echo "File exists!"
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "Status: 404 Not Found"
|
||||||
|
echo "Content-Type: text/plain"
|
||||||
|
echo ""
|
||||||
|
echo "File $FILE not found!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
env
|
5
.wifisd/init.d/99cgi-bin.sh
Normal file
5
.wifisd/init.d/99cgi-bin.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
chmod a+x /mnt/sd/.wifisd/cgi-bin/refresh_sd
|
||||||
|
chmod a+x /mnt/sd/.wifisd/cgi-bin/wifi_delete
|
||||||
|
ln -s /mnt/sd/.wifisd/cgi-bin/refresh_sd /www/cgi-bin/refresh_sd
|
||||||
|
ln -s /mnt/sd/.wifisd/cgi-bin/wifi_delete /www/cgi-bin/wifi_delete
|
Reference in New Issue
Block a user