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-06-12 18:25:32 -06:00
|
|
|
IP=$(dbip -a)
|
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
|
2012-07-22 17:14:06 -06:00
|
|
|
for d in /packages/*; do
|
|
|
|
w=$CTF_BASE/www/$(basename $d)
|
2011-10-19 16:16:57 -06:00
|
|
|
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
|
2012-07-22 17:14:06 -06:00
|
|
|
ln -sf $d/www/* $CTF_BASE/www/
|
2010-09-29 17:38:54 -06:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2012-08-16 19:47:19 -06:00
|
|
|
cd $CTF_BASE/www
|
2012-07-22 17:14:06 -06:00
|
|
|
exec tcpsvd -u ctf ${IP%/*} 80 $CTF_BASE/packages/mcp/bin/eris -c.
|