1
0
Fork 0
mirror of https://github.com/dirtbags/moth.git synced 2025-01-05 11:30:41 -07:00
moth/packages/p2/service/httpd/run
Neale Pickett f5d4ef25a7 Working p2, eliminate 00admin
This required a fair amount of shuffling stuff around, as can be seen.
Fortunately, now things ought to be able to run more or less standalone
again.

I also figured out a way to have the build system be a tad smarter about
not rebuilding shared stuff, although you still install the exact same eris
binary and /service subdirs for mcp and p2.  But at least you only have to
change one place in the source code now.
2012-06-12 18:25:32 -06:00

20 lines
397 B
Bash
Executable file

#! /bin/sh -e
exec 2>&1
IP=$(dbip -p ../p2console/ip.txt)
# 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
ln -sf /var/www default
exec tcpsvd -u nobody ${IP%/*} 80 /opt/p2/bin/eris -c