From f0ced9cb1faabfe617e8fa6ebd9f0b3b71ea6b7c Mon Sep 17 00:00:00 2001 From: Christian Pierre MOMON Date: Sat, 15 Oct 2016 03:43:07 +0200 Subject: [PATCH] Enabled log. Added log filter. Set relative path detection. --- bot.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 bot.sh diff --git a/bot.sh b/bot.sh new file mode 100755 index 0000000..3a31b0e --- /dev/null +++ b/bot.sh @@ -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" & + +