2010-10-09 18:13:01 -06:00
|
|
|
#! /bin/sh -e
|
2010-09-24 17:24:43 -06:00
|
|
|
|
|
|
|
exec 2>&1
|
|
|
|
|
2010-10-22 09:36:28 -06:00
|
|
|
DB=/var/lib/ctf/puzzles.db
|
|
|
|
|
2011-10-12 17:41:19 -06:00
|
|
|
# Create CTF user
|
|
|
|
touch /etc/group /etc/passwd
|
|
|
|
addgroup -g 56634 nogroup || true
|
2011-09-23 16:04:25 -06:00
|
|
|
adduser -D -S -h /var/lib/ctf -H ctf || true
|
|
|
|
|
|
|
|
mkdir -p /var/lib/ctf /var/www
|
2010-10-22 09:36:28 -06:00
|
|
|
touch $DB
|
|
|
|
chown ctf $DB
|
2010-09-24 22:28:40 -06:00
|
|
|
|
2010-09-24 17:24:43 -06:00
|
|
|
# Make an initial listing
|
|
|
|
./puzzled
|
|
|
|
|
2010-10-22 09:36:28 -06:00
|
|
|
exec inotifyd ./puzzled ${DB}:w
|