moth/packages/p2/service/httpd/run

21 lines
397 B
Plaintext
Raw Normal View History

2012-06-09 16:11:23 -06:00
#! /bin/sh -e
exec 2>&1
IP=$(dbip -p ../p2console/ip.txt)
2012-06-09 16:11:23 -06:00
# Link in puzzles and web pages
install -d /var/www
for d in /opt/*; do
w=/var/www/$(basename $d)
if [ -d $d/puzzles ] && ! [ -d $w ]; then
ln -sf $d/puzzles $w
fi
if [ -d $d/www ]; then
ln -sf $d/www/* /var/www/
fi
done
ln -sf /var/www default
exec tcpsvd -u nobody ${IP%/*} 80 /opt/p2/bin/eris -c