diff --git a/Makefile b/Makefile index f3ed95d..cf2406b 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ install: $(BINARIES) $(HTML) install summary.awk $(DESTDIR)/bin install forftanks $(DESTDIR)/bin - install -d $(DESTDIR)/www + install -d -o $(id -u www) -g $(id -g www) $(DESTDIR)/www install upload.cgi $(DESTDIR)/www install -m 0644 $(HTML) $(DESTDIR)/www install -m 0644 $(WWW) $(DESTDIR)/www diff --git a/README.md b/README.md index d3a668c..c373031 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ Documentation ------------- * [Homepage](https://dirtbags.github.io/tanks/) -* [History](doc/history.md) -* [Running](doc/running.md) +* [History](docs/history.md) +* [Running](docs/running.md) Author diff --git a/docs/running.md b/docs/running.md index 3ad5628..9ad890a 100644 --- a/docs/running.md +++ b/docs/running.md @@ -38,18 +38,18 @@ game. This is what tanks.js uses to render a game graphically. The object printed contains: [[game-width, game-height], - [[tank1-color, + [[tank1-color, [[sensor1range, sensor1angle, sensor1width, sensor1turret], ...]], ...], [[ - [tank1x, tank1y, tank1angle, tank1sensangle, + [tank1x, tank1y, tank1angle, tank1sensangle, tank1flags, tank1sensors], ...], ...]] If file descriptor 3 is open for writes, it also outputs the results of -the round to fd3. +the round to fd3. ### rank.awk @@ -70,4 +70,20 @@ Accepts form input and writes a tank. +Problems +======== + +Nothing uploads +--------------- + +The user running the web server has to be able to write to the directory serving the CGI. +Yes, I realize this is a terrible design. Please feel encouraged to submit a merge request. + + +Only sensors upload +------------------- + +The user running the web server has to be able to write to the directory serving the CGI. +Not just the directory with the tank token. +Yes, I realize this is a terrible design. Please feel encouraged to submit a merge request. diff --git a/go.sh b/go.sh index 5fb5473..74e6587 100644 --- a/go.sh +++ b/go.sh @@ -3,7 +3,7 @@ cd $(dirname $0)/../www ( - s6-tcpserver -u 80 -g 80 0.0.0.0 80 /usr/bin/eris -c -. + s6-tcpserver -u $(id -u www) -g $(id -g www) 0.0.0.0 80 /usr/bin/eris -c -. ) & (