From bf2199e9cca8e859986047b67fd40b6cf73e365d Mon Sep 17 00:00:00 2001 From: Helge Jung <hej@c3pb.de> Date: Thu, 29 May 2014 13:50:56 +0200 Subject: [PATCH] add start/stop script --- bot.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 bot.sh diff --git a/bot.sh b/bot.sh new file mode 100755 index 0000000..12592eb --- /dev/null +++ b/bot.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +mydir=$(readlink -f $0) +mydir=$(dirname "$mydir") + +case $1 in + start) + [ ! -d "${mydir}/logs" ] && mkdir "${mydir}/logs" + + "${mydir}/willie/willie.py" -c "${mydir}/ffpb.cfg" --fork + ;; + stop) + "${mydir}/willie/willie.py" -c "${mydir}/ffpb.cfg" --quit + ;; + *) + echo "Unknown command. Please give 'start' or 'stop'." + exit 1 + ;; +esac -- GitLab