1
0
Fork 0
mirror of https://github.com/dirtbags/moth.git synced 2025-01-05 19:40:52 -07:00
moth/packages/mcp/service/httpd/run
2012-05-10 12:32:09 -06:00

22 lines
399 B
Bash
Executable file

#! /bin/sh -e
exec 2>&1
IP=$(/opt/00admin/sbin/fire-ip add)
hostname mcp
# 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
cd /var/www
exec tcpsvd -u ctf ${IP%/*} 80 /opt/mcp/bin/eris -c