lolbot/runbot
Jonathan Harker eb6357a3b8 Now uses sqlalchemy for persistent storage and logging.
* Uses sqlalchemy declarative schema for the log and saved URLs.
 * runbot now not using nohup. Will need to be daemonised somehow.
 * Refactored botcommon.py out of existence.
 * Now reads from a config file which can optionally be specified at the
   command line with --config option.
 * Prints usage with --help or if no config file is found.
2010-06-04 04:39:05 +12:00

20 lines
360 B
Bash
Executable file

#!/bin/sh
PATH=/bin:/usr/bin
NOW=`date +%Y-%m-%d_%H%M`
if [ "x$1" = "x" ]; then
CONFIG=""
else
CONFIG="--config $1"
fi
LOLBOTS=`ps -ef|grep 'lolbot.py'|grep -v grep|awk '{print $2}'`
if [ "$LOLBOTS" != "" ]; then
kill $LOLBOTS
fi
cd `dirname $0`
APP_PATH=`pwd`
/usr/bin/python $APP_PATH/lolbot.py $CONFIG > server-$NOW.log 2> error-$NOW.log &