mirror of https://github.com/dirtbags/moth.git
Make it work on woozle
This commit is contained in:
parent
868a6a6b92
commit
bbd78ab32f
33
Makefile
33
Makefile
|
@ -4,7 +4,8 @@ WWW = $(BASE)/www
|
||||||
LIB = $(BASE)/lib
|
LIB = $(BASE)/lib
|
||||||
BIN = $(BASE)/bin
|
BIN = $(BASE)/bin
|
||||||
SBIN = $(BASE)/sbin
|
SBIN = $(BASE)/sbin
|
||||||
BASE_URL = /ctf/
|
BASE_URL = /
|
||||||
|
USERNAME = www-data
|
||||||
|
|
||||||
TEMPLATE = $(CURDIR)/template.html
|
TEMPLATE = $(CURDIR)/template.html
|
||||||
MDWNTOHTML = $(CURDIR)/mdwntohtml.py --template=$(TEMPLATE) --base=$(BASE_URL)
|
MDWNTOHTML = $(CURDIR)/mdwntohtml.py --template=$(TEMPLATE) --base=$(BASE_URL)
|
||||||
|
@ -16,12 +17,12 @@ INSTALL_TARGETS = $(addsuffix -install, $(SUBDIRS))
|
||||||
include $(addsuffix /*.mk, $(SUBDIRS))
|
include $(addsuffix /*.mk, $(SUBDIRS))
|
||||||
|
|
||||||
install: base-install $(INSTALL_TARGETS)
|
install: base-install $(INSTALL_TARGETS)
|
||||||
install --directory --owner=ctf $(VAR)/tanks
|
install --directory --owner=$(USERNAME) $(VAR)/tanks
|
||||||
install --directory --owner=ctf $(VAR)/tanks/results
|
install --directory --owner=$(USERNAME) $(VAR)/tanks/results
|
||||||
install --directory --owner=ctf $(VAR)/tanks/errors
|
install --directory --owner=$(USERNAME) $(VAR)/tanks/errors
|
||||||
install --directory --owner=ctf $(VAR)/tanks/ai
|
install --directory --owner=$(USERNAME) $(VAR)/tanks/ai
|
||||||
install --directory --owner=ctf $(VAR)/tanks/ai/players
|
install --directory --owner=$(USERNAME) $(VAR)/tanks/ai/players
|
||||||
install --directory --owner=ctf $(VAR)/tanks/ai/house
|
install --directory --owner=$(USERNAME) $(VAR)/tanks/ai/house
|
||||||
|
|
||||||
echo 'VAR = "$(VAR)"' > ctf/paths.py
|
echo 'VAR = "$(VAR)"' > ctf/paths.py
|
||||||
echo 'WWW = "$(WWW)"' >> ctf/paths.py
|
echo 'WWW = "$(WWW)"' >> ctf/paths.py
|
||||||
|
@ -57,16 +58,16 @@ install: base-install $(INSTALL_TARGETS)
|
||||||
|
|
||||||
|
|
||||||
base-install:
|
base-install:
|
||||||
id ctf || useradd --system --shell /bin/false --home $(VAR) \
|
id $(USERNAME) || useradd --system --shell /bin/false --home $(VAR) \
|
||||||
--comment "Capture The Flag" ctf
|
--comment "Capture The Flag" $(USERNAME)
|
||||||
install --directory $(LIB) $(BIN) $(SBIN)
|
install --directory $(LIB) $(BIN) $(SBIN)
|
||||||
install --directory --owner=ctf $(VAR)
|
install --directory --owner=$(USERNAME) $(VAR)
|
||||||
install --directory --owner=ctf $(WWW)
|
install --directory --owner=$(USERNAME) $(WWW)
|
||||||
install --directory --owner=ctf $(WWW)/puzzler
|
install --directory --owner=$(USERNAME) $(WWW)/puzzler
|
||||||
install --directory --owner=ctf $(VAR)/points
|
install --directory --owner=$(USERNAME) $(VAR)/points
|
||||||
install --directory --owner=ctf $(VAR)/points/tmp
|
install --directory --owner=$(USERNAME) $(VAR)/points/tmp
|
||||||
install --directory --owner=ctf $(VAR)/points/cur
|
install --directory --owner=$(USERNAME) $(VAR)/points/cur
|
||||||
install --directory --owner=ctf $(VAR)/flags
|
install --directory --owner=$(USERNAME) $(VAR)/flags
|
||||||
|
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
|
|
|
@ -3,4 +3,4 @@ WWW = "/opt/ctf/www"
|
||||||
LIB = "/opt/ctf/lib"
|
LIB = "/opt/ctf/lib"
|
||||||
BIN = "/opt/ctf/bin"
|
BIN = "/opt/ctf/bin"
|
||||||
SBIN = "/opt/ctf/sbin"
|
SBIN = "/opt/ctf/sbin"
|
||||||
BASE_URL = "/ctf/"
|
BASE_URL = "/"
|
||||||
|
|
|
@ -3,4 +3,4 @@ WWW = "/opt/ctf/www"
|
||||||
LIB = "/opt/ctf/lib"
|
LIB = "/opt/ctf/lib"
|
||||||
BIN = "/opt/ctf/bin"
|
BIN = "/opt/ctf/bin"
|
||||||
SBIN = "/opt/ctf/sbin"
|
SBIN = "/opt/ctf/sbin"
|
||||||
BASE_URL = "/ctf/"
|
BASE_URL = "/"
|
||||||
|
|
Loading…
Reference in New Issue