From 3ec42e497e45f2c28452407651d741d15625125a Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Mon, 13 Apr 2015 13:14:40 -0600 Subject: [PATCH] Bugfixes (thanks civ) --- README | 22 +++++++++++++++------- kothd | 13 +++++++++++++ 2 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 kothd diff --git a/README b/README index e564d4a..9038ed8 100644 --- a/README +++ b/README @@ -26,9 +26,9 @@ so you can run multiple contests at once if you want. If you were to want to run it out of `/opt/koth`, do the following: - $ mkdir -p /opt/hack/mycontest - $ ./install /opt/hack/mycontest - $ cp kothd /opt/hack + $ mkdir -p /opt/koth/mycontest + $ ./install /opt/koth/mycontest + $ cp kothd /opt/koth Yay, you've got it set up. @@ -37,18 +37,26 @@ Installing Puzzle Categories ------------------------------------ Puzzle categories are distributed in a different way than the server. -If you have one, -just run +After setting up (see above), just run - $ /opt/koth/hack/bin/install-category /path/to/my/category + $ /opt/koth/mycontest/bin/install-category /path/to/my/category Running It ------------- Get your web server to serve up files from -`/opt/koth/hack/www`. +`/opt/koth/mycontest/www`. Then run `/opt/koth/kothd`. + +Permissions +---------------- + It's up to you not to be a bonehead about permissions. + +Install sets it so the web user on your system can write to the files it needs to, +but if you're using Apache, +it plays games with user IDs when running CGI. +You're going to have to figure out how to configure your preferred web server. diff --git a/kothd b/kothd new file mode 100644 index 0000000..4eb772e --- /dev/null +++ b/kothd @@ -0,0 +1,13 @@ +#! /bin/sh + +cd ${1:-$(dirname $0)} +KOTH_BASE=$(cwd) + +echo "Running koth instances in $KOTH_BASE" + +while true; do + for i in $KOTH_BASE/*/assigned.txt; do + dir=${i%/*} + $dir/bin/once + done +done