mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2024-11-16 18:47:57 +01:00
b4aa1a9746
- rename 'wifibox.cgi-fallback.log' to 'wifibox.stdout.log' - extend description of Lua debugging (and the fallback log) - send fallback log along with info/logfiles request
30 lines
852 B
Bash
30 lines
852 B
Bash
#!/bin/sh
|
|
# 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.
|
|
|
|
# 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.
|
|
|
|
LUA=lua
|
|
SCRIPT_PATH=/usr/share/lua/wifibox
|
|
LOG_FILE=/tmp/wifibox.stdout.log
|
|
|
|
cd $SCRIPT_PATH
|
|
#echo "CGI invocation" >> $LOG_FILE
|
|
#strace -o /tmp/trace-$$.log -ff $LUA ./cmdmain.lua $@ 2>> $LOG_FILE
|
|
$LUA ./cmdmain.lua $@ 2>> $LOG_FILE
|
|
|
|
exit $?
|
|
|
|
|
|
# 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 "---"
|