2010-09-29 17:38:54 -06:00
|
|
|
#! /bin/sh
|
|
|
|
|
2010-10-09 18:13:01 -06:00
|
|
|
exec 2>&1
|
|
|
|
|
|
|
|
install -d /var/www
|
2010-09-29 17:38:54 -06:00
|
|
|
|
|
|
|
# Link in puzzles and web pages
|
|
|
|
for d in /opt/*; do
|
|
|
|
if [ -d $d/puzzles ]; then
|
2010-10-09 18:13:01 -06:00
|
|
|
ln -sf $d/puzzles /var/www/$(basename $d)
|
2010-09-29 17:38:54 -06:00
|
|
|
fi
|
|
|
|
if [ -d $d/www ]; then
|
2010-10-09 18:13:01 -06:00
|
|
|
ln -sf $d/www/* /var/www/
|
2010-09-29 17:38:54 -06:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2011-03-03 20:46:50 -07:00
|
|
|
cd /var/www
|
|
|
|
exec thttpd -D \
|
|
|
|
-h 10.0.0.2 \
|
|
|
|
-c "**.cgi" \
|
|
|
|
-u ctf \
|
|
|
|
-l /proc/self/fd/1 \
|
|
|
|
-T UTF-8 \
|
|
|
|
-nos
|