1
0
Fork 0
mirror of https://github.com/dirtbags/moth.git synced 2025-01-06 20:10:36 -07:00
moth/packages/mcp/service/httpd/run
2011-03-14 17:13:25 -06:00

23 lines
410 B
Bash
Executable file

#! /bin/sh
exec 2>&1
ip addr add 10.0.0.2/16 label eth0:mcp dev eth0
install -d /var/www
# Link in puzzles and web pages
for d in /opt/*; do
if [ -d $d/puzzles ]; then
ln -sf $d/puzzles /var/www/$(basename $d)
fi
if [ -d $d/www ]; then
ln -sf $d/www/* /var/www/
fi
done
mkdir -p sites
cd sites
ln -sf /var/www default
exec tcpsvd -u ctf 10.0.0.2 80 /opt/mcp/bin/fnord-cgi