changeset 234:a7079e835432

added stop command in sat.sh launching script
author Goffi <goffi@goffi.org>
date Thu, 06 Jan 2011 19:17:09 +0100
parents 6a37bc1b0b8c
children 7a2ef5fe4e8d
files src/sat.sh
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/sat.sh	Thu Jan 06 19:16:50 2011 +0100
+++ b/src/sat.sh	Thu Jan 06 19:17:09 2011 +0100
@@ -1,5 +1,14 @@
 #!/bin/sh
 
+#if there is one argument which is "stop", then we kill SàT
+if [ $# -eq 1 ];then
+	if [ $1 = "stop" ];then
+		echo "Terminating Salut à Toi"
+		pkill -f "twistd.*sat/sat.tac"
+		exit 0
+	fi
+fi
+
 NAME='sat'
 
 PID_FILE="/tmp/$NAME.pid"