mirror of https://github.com/dirtbags/moth.git
Add new-contest script
This commit is contained in:
parent
4f3c7190d4
commit
0f2b521279
1
Makefile
1
Makefile
|
@ -25,6 +25,7 @@ target: $(PYC)
|
|||
|
||||
$(INSTALL) -d $(DESTDIR)/usr/sbin
|
||||
$(INSTALL) ctfd.py $(DESTDIR)/usr/sbin
|
||||
$(INSTALL) new-contest $(DESTDIR)/usr/sbin
|
||||
|
||||
$(INSTALL) -d $(WWWDIR)
|
||||
$(INSTALL) index.html intro.html ctf.css grunge.png $(WWWDIR)
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
#! /bin/sh -e
|
||||
|
||||
ctime () {
|
||||
stat -c %z $1 | awk '{ print $1; }'
|
||||
}
|
||||
|
||||
rotate () {
|
||||
mv $1 $1.$(ctime $1)
|
||||
}
|
||||
|
||||
rotate /var/lib/ctf/puzzler.dat
|
||||
rotate /var/lib/ctf/scores.dat
|
||||
rotate /var/lib/ctf/passwd
|
||||
rm -f /var/lib/ctf/flags/* || true
|
||||
|
||||
echo "Things you may want to tweak:"
|
||||
find /var/lib/ctf/disabled
|
||||
find /var/lib/kevin/tokens
|
Loading…
Reference in New Issue