moth/packages/mcp/service/httpd/run

22 lines
387 B
Plaintext
Raw Normal View History

#! /bin/sh -e
2010-10-09 18:13:01 -06:00
exec 2>&1
IP=$(dbip -a)
2012-04-19 17:40:30 -06:00
hostname mcp
# 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)
if [ -d $d/puzzles ] && ! [ -d $w ]; then
ln -sf $d/puzzles $w
fi
if [ -d $d/www ]; then
2012-07-22 17:14:06 -06:00
ln -sf $d/www/* $CTF_BASE/www/
fi
done
cd /var/www
2012-07-22 17:14:06 -06:00
exec tcpsvd -u ctf ${IP%/*} 80 $CTF_BASE/packages/mcp/bin/eris -c.