http stream tcp nowait root /usr/sbin/tcpd /usr/local/bin/sh-httpd
don't worry about the spacing. Then you need to HUP inetd process, by entering the command "ps -ef | grep inet", look for the first number and enter "kill -1 xxxx". Or, in desperation, reboot! e.g.# ps -ef | grep inet
root 4802 1 0 21:41 ? 00:00:00 /usr/sbin/inetd
root 5726 5671 0 22:41 pts/0 00:00:00 grep inet
# kill -1 4802
#
#!/bin/bash
DBGFILE=/tmp/sh-httpd.log
date >> $DBGFILE
H="IGNORE"
while [ "$H" != "" ];
do
echo $H >> $DBGFILE
read H
H=`echo $H | sed -e 's/^M//g'`
done
echo 'HTTP/1.1 200 OK'
echo -n "Date: "'
date|sed 's/ /, /''
echo 'Server: sh-http/0.01 (Linux/bash)'
echo 'Accept-Ranges: bytes'
echo 'Connection: close'
echo 'Content-Type: text/html'
echo ''
echo ''
echo ''
echo ''
echo 'Zaurus sh-httpd daemon '
echo ''
echo ""
echo "hello"
echo "
"
echo ""
echo "finished" >> $DBGFILE
# end sh-httpd
chmod ugo+x /usr/local/bin/sh-httpd
#!/bin/bash
read REQ_GET REQ_URL REQ_PROTO
REQ_URI=`echo $REQ_URL | awk '-F?' '{print $1}'`
export QUERY_STRING=`echo $REQ_URL | awk '-F?' '{print $2}'`
V="IGNORE"
while [ "$V" != "" ];
do
read H V
H=`echo $H | sed -e 's/:$//' -e 's/-/_/g'`
V=`echo $V | sed -e 's/^M$//'`
done
echo 'HTTP/1.1 200 OK'
echo -n 'Date: '
date|sed 's/ /, /'
echo "Server: sh-http/0.01 (Linux/bash)"
echo 'Accept-Ranges: bytes'
echo 'Connection: close'
if [ "$REQ_URI" = "/namazu.cgi" ]; then
export SCRIPT_NAME=/namazu.cgi
/mnt/card/namazu/namazu.cgi
else
echo 'Content-Type: text/html'
echo ''
echo ''
echo ''
echo 'Zaurus sh-httpd daemon '
echo ''
echo ''
echo 'sh-http
'
date
echo '
'
echo 'namazu
'
echo ''
env
echo '
'
echo ''
fi
# end sh-httpd
wasent there a full webserver written in AWK on the net here is one http://www.sunsite.ualberta.ca/Documentati...gawkinet_4.html (http://www.sunsite.ualberta.ca/Documentation/Gnu/gawk-3.1.0/html_chapter/gawkinet_4.html)
but i remeber there being one that could be run as a standalone daemon
cant wait to see CGI support , perhaps i might do a bit of tinkering myself
[div align=\"right\"][a href=\"index.php?act=findpost&pid=147761\"][{POST_SNAPBACK}][/a][/div]
so now that we have this HTTP server working, how about something more full-fledged but light-weight like lightty? Is light-httpd been compiled for the Zaurus ?
I mean, if Apache can run on the Z, I am sure Lightty can too - or am I wrong ?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=147988\"][{POST_SNAPBACK}][/a][/div]