mirror of https://github.com/dirtbags/moth.git
23 lines
378 B
Bash
Executable File
23 lines
378 B
Bash
Executable File
#! /bin/sh -e
|
|
|
|
exec 2>&1
|
|
|
|
IP=$(dbip -a)
|
|
|
|
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.
|