comparison src/sat.sh @ 1548:61c03265e133

launching script: use SIGTERM instead of SIGINT with the “stop” command
author Goffi <goffi@goffi.org>
date Mon, 02 Nov 2015 22:02:41 +0100
parents 02c26e6630d0
children 7a07f232e7cb
comparison
equal deleted inserted replaced
1547:0632d96f08ad 1548:61c03265e133
8 # $1 is the file containing the PID to kill, $2 is the process name 8 # $1 is the file containing the PID to kill, $2 is the process name
9 if [ -f $1 ]; then 9 if [ -f $1 ]; then
10 PID=`cat $1` 10 PID=`cat $1`
11 if ps -p $PID > /dev/null; then 11 if ps -p $PID > /dev/null; then
12 echo "Terminating $2... " 12 echo "Terminating $2... "
13 kill -INT $PID 13 kill $PID
14 else 14 else
15 echo "No running process of ID $PID... removing PID file" 15 echo "No running process of ID $PID... removing PID file"
16 rm -f $1 16 rm -f $1
17 fi 17 fi
18 else 18 else