comparison src/sat.sh @ 249:0ed5553b5313

added "debug" command to sat launcher script
author Goffi <goffi@goffi.org>
date Sun, 16 Jan 2011 02:54:08 +0100
parents a7079e835432
children 31804aa9d3da
comparison
equal deleted inserted replaced
248:624e3ed4782d 249:0ed5553b5313
1 #!/bin/sh 1 #!/bin/sh
2 2
3 #if there is one argument which is "stop", then we kill SàT 3 #if there is one argument which is "stop", then we kill SàT
4 DEBUG=""
4 if [ $# -eq 1 ];then 5 if [ $# -eq 1 ];then
5 if [ $1 = "stop" ];then 6 if [ $1 = "stop" ];then
6 echo "Terminating Salut à Toi" 7 echo "Terminating Salut à Toi"
7 pkill -f "twistd.*sat/sat.tac" 8 pkill -f "twistd.*sat/sat.tac"
8 exit 0 9 exit 0
10 fi
11 if [ $1 = "debug" ];then
12 echo "Launching SàT in debug mode"
13 DEBUG="--debug"
9 fi 14 fi
10 fi 15 fi
11 16
12 NAME='sat' 17 NAME='sat'
13 18
18 TAP_PATH="./" 23 TAP_PATH="./"
19 TAP_FILE="$NAME.tac" 24 TAP_FILE="$NAME.tac"
20 25
21 #Don't change the next line 26 #Don't change the next line
22 AUTO_OPTIONS="" 27 AUTO_OPTIONS=""
23 ADDITIONAL_OPTIONS="--pidfile $PID_FILE --logfile $LOG_FILE $AUTO_OPTIONS" 28 ADDITIONAL_OPTIONS="--pidfile $PID_FILE --logfile $LOG_FILE $AUTO_OPTIONS $DEBUG"
24 29
25 log_dir=`dirname "$LOG_FILE"` 30 log_dir=`dirname "$LOG_FILE"`
26 if [ ! -d $log_dir ] ; then 31 if [ ! -d $log_dir ] ; then
27 mkdir $log_dir 32 mkdir $log_dir
28 fi 33 fi