2012-06-09 16:11:23 -06:00
|
|
|
#! /bin/sh -e
|
|
|
|
|
|
|
|
exec 2>&1
|
|
|
|
|
2012-06-12 18:25:32 -06:00
|
|
|
IP=$(dbip -p ../p2console/ip.txt)
|
2012-06-09 16:11:23 -06:00
|
|
|
|
2012-07-12 16:55:36 -06:00
|
|
|
ip route add default via 10.0.0.1
|
|
|
|
|
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
|
|
|
|
|
2012-07-02 18:21:00 -06:00
|
|
|
cd /var/www
|
|
|
|
exec tcpsvd -u nobody ${IP%/*} 80 /opt/p2/bin/eris -c.
|