2013-04-04 10:18:08 +02:00
|
|
|
#!/bin/sh
|
2013-08-22 18:34:45 +02:00
|
|
|
|
|
|
|
# NOTE: redirection to $LOG_FILE is not required anymore, it is configurable now.
|
|
|
|
# It is left in just as a precaution for a badly configured firmware invocation.
|
2013-04-04 10:18:08 +02:00
|
|
|
|
|
|
|
LUA=lua
|
2013-06-30 19:06:55 +02:00
|
|
|
SCRIPT_PATH=/usr/share/lua/wifibox
|
2013-07-08 13:34:27 +02:00
|
|
|
LOG_FILE=/tmp/wifibox.log
|
2013-04-04 10:18:08 +02:00
|
|
|
|
|
|
|
cd $SCRIPT_PATH
|
2013-08-23 16:28:03 +02:00
|
|
|
echo "CGI invocation" >> $LOG_FILE
|
2013-08-26 09:53:58 +02:00
|
|
|
strace - /tmp/trace-$$.log $LUA ./cmdmain.lua $@ 2>> $LOG_FILE
|
2013-07-08 13:34:27 +02:00
|
|
|
|
2013-08-21 22:49:17 +02:00
|
|
|
exit $?
|
2013-07-08 13:34:27 +02:00
|
|
|
|
|
|
|
# Code below is for debugging incoming CGI data
|
|
|
|
read -n $CONTENT_LENGTH POSTDATA
|
|
|
|
echo -e "Content-type: text/plain\r\n\r\n"
|
|
|
|
set
|
|
|
|
echo "---"
|
|
|
|
echo $POSTDATA
|
|
|
|
echo "---"
|