Browse Source

bot.sh: support 'restart' and recognize 'reload' parameter

Helge Jung 10 years ago
parent
commit
04a06d918a
1 changed files with 13 additions and 1 deletions
  1. 13 1
      bot.sh

+ 13 - 1
bot.sh

@@ -12,8 +12,20 @@ case $1 in
 	stop)
 		"${mydir}/willie/willie.py" -c "${mydir}/ffpb.cfg" --quit
 		;;
+
+	restart)
+		"$0" stop
+		sleep 2
+		"$0" start
+		;;
+
+	reload)
+		echo "Not supported by script. Issue '!reload ffpb' in a query to reload the ffpb module."
+		exit 2
+		;;
+
 	*)
-		echo "Unknown command. Please give 'start' or 'stop'."
+		echo "Unknown command. Please give 'start', 'stop' or 'restart'."
 		exit 1
 		;;
 esac