Added SATS.server lock file
This commit is contained in:
parent
591f0beb4f
commit
bf3f011bd4
12
sats/main
12
sats/main
|
@ -12,10 +12,16 @@ test $# -lt 1 && echo -e "ERR: Missing argument\n\n\tSATS_ID\tThe id for the bas
|
|||
|
||||
# (2) Start server in background (keep PID)
|
||||
#--------------------------------------------------------#
|
||||
# (1) Start server #
|
||||
# (1) Start server (if not already done) #
|
||||
if [ ! -f $ROOT/sats/.lock ]; then
|
||||
|
||||
$ROOT/com/launch sats $1 44441 44440 9999&
|
||||
SERV_PID=$!;
|
||||
|
||||
touch $ROOT/sats/.lock;
|
||||
|
||||
fi;
|
||||
|
||||
|
||||
|
||||
# (3) Start daemons
|
||||
|
@ -48,6 +54,10 @@ on_exit(){
|
|||
echo 'sats.server.kill';
|
||||
kill -9 $SERV_PID 2>/dev/null;
|
||||
|
||||
## {4} Delete lock file ##
|
||||
echo 'sats.server.lock.delete';
|
||||
rm $ROOT/sats/.lock 2>/dev/null;
|
||||
|
||||
exit 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue