Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 34 lines (29 sloc) 0.618 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
#!/bin/sh
SELF=$(cd $(dirname $0); pwd -P)/
CWD=$(pwd)

cd $SELF

start() {
if [ ! -e "$SELF/env/bin/paster" ]
then
echo "please install the prerequisites by using the included install.sh script"
exit
fi
echo "starting theory"
"$SELF/env/bin/paster" serve --daemon --reload --log-file "$SELF/theory.log" "$SELF/server.ini" && echo "theory started, http://localhost:9099/ if you're using the default port"
}

stop() {
echo "stopping theory"
"$SELF/env/bin/paster" serve "$SELF/server.ini" stop
}

case $1 in
'start')
start;
;;
'stop')
stop;
;;
*)
echo "usage: run-theory (start|stop)"
;;
esac

cd $CWD
Something went wrong with that request. Please try again.