2011-10-19 16:16:57 -06:00
|
|
|
#! /bin/sh -e
|
2010-09-29 17:38:54 -06:00
|
|
|
|
2010-10-09 18:13:01 -06:00
|
|
|
exec 2>&1
|
|
|
|
|
2012-04-19 17:40:30 -06:00
|
|
|
IP=$(/opt/00admin/sbin/fire-ip add)
|
2011-10-19 16:16:57 -06:00
|
|
|
|
2012-04-19 17:40:30 -06:00
|
|
|
hostname mcp
|
2010-09-29 17:38:54 -06:00
|
|
|
|
|
|
|
# Link in puzzles and web pages
|
2011-09-23 16:04:25 -06:00
|
|
|
install -d /var/www
|
2010-09-29 17:38:54 -06:00
|
|
|
for d in /opt/*; do
|
2011-10-19 16:16:57 -06:00
|
|
|
w=/var/www/$(basename $d)
|
|
|
|
if [ -d $d/puzzles ] && ! [ -d $w ]; then
|
|
|
|
ln -sf $d/puzzles $w
|
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
|
|
|
|
|
2012-05-11 11:15:42 -06:00
|
|
|
ln -sf /var/www default
|
2012-05-10 12:32:09 -06:00
|
|
|
exec tcpsvd -u ctf ${IP%/*} 80 /opt/mcp/bin/eris -c
|