#! /bin/sh -e
exec 2>&1
install -o ctf -m 0644 /dev/null /var/lib/ctf/puzzles.db
install -d /var/www
# Make an initial listing
./puzzled
exec inotifyd ./puzzled /var/lib/ctf/puzzles.db:w