moth/packages/mcp/service/httpd/run

22 lines
392 B
Bash
Executable File

#! /bin/sh -e
exec 2>&1
IP=$(dbip -a)
hostname mcp
# Link in puzzles and web pages
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
ln -sf $d/www/* $CTF_BASE/www/
fi
done
cd $CTF_BASE/www
exec tcpsvd -u ctf ${IP%/*} 80 $CTF_BASE/packages/mcp/bin/eris -c.