1
0
Fork 0
mirror of https://github.com/dirtbags/moth.git synced 2025-01-05 11:30:41 -07:00
moth/bin/httpd
2017-02-05 16:42:41 -07:00

16 lines
347 B
Bash
Executable file

#!/bin/sh -e
# Starts a standalone server using tcpsvd and eris
echo "Figuring out web user..."
for www in www-data http tc _ _www; do
id $www && break
done
if [ $www = _ ]; then
echo "Unable to determine httpd user on this system. Dying."
exit 1
fi
cd $(dirname $0)/../www
tcpserver -RHI localhost -u $www -g $www 0 80 eris -c -.