2013-04-04 10:18:08 +02:00
|
|
|
#!/bin/sh
|
2013-12-20 16:29:46 +01:00
|
|
|
# This file is part of the Doodle3D project (http://doodle3d.com).
|
|
|
|
#
|
|
|
|
# Copyright (c) 2013, Doodle3D
|
|
|
|
# This software is licensed under the terms of the GNU GPL v2 or later.
|
|
|
|
# See file LICENSE.txt or visit http://www.gnu.org/licenses/gpl.html for full license details.
|
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
|
2016-02-23 16:18:42 +01:00
|
|
|
LOG_FILE=/tmp/wifibox.stdout.log
|
2013-04-04 10:18:08 +02:00
|
|
|
|
|
|
|
cd $SCRIPT_PATH
|
2014-06-16 14:19:29 +02:00
|
|
|
#echo "CGI invocation" >> $LOG_FILE
|
2013-08-26 16:15:45 +02:00
|
|
|
#strace -o /tmp/trace-$$.log -ff $LUA ./cmdmain.lua $@ 2>> $LOG_FILE
|
|
|
|
$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
|
|
|
|
2014-06-16 14:19:29 +02:00
|
|
|
|
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 "---"
|