moth/packages/mcp/service/puzzled/run

20 lines
306 B
Bash
Executable File

#! /bin/sh -e
exec 2>&1
DB=/var/lib/ctf/puzzles.db
# Create CTF user
touch /etc/group /etc/passwd
addgroup -g 56634 nogroup || true
adduser -D -S -h /var/lib/ctf -H ctf || true
mkdir -p /var/lib/ctf /var/www
touch $DB
chown ctf $DB
# Make an initial listing
./puzzled
exec inotifyd ./puzzled ${DB}:w