Enabled log. Added log filter. Set relative path detection.

This commit is contained in:
Christian P. MOMON 2016-10-15 03:43:07 +02:00 committed by root
parent 01a5963fad
commit f0ced9cb1f

15
bot.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
BINDIR="`dirname "$0"`"
HOMEDIR="`dirname "$BINDIR"`"
echo "BINDIR=$BINDIR"
echo "HOMEDIR=$HOMEDIR"
cd "$BINDIR"
#nohup /srv/welcomebot/git/bot.py >> /dev/null 2>>../welcomebot.log &
nohup python -u "$BINDIR/bot.py" 2>&1 | grep -v "^$" >> "$HOMEDIR/welcomebot.log" &