Former-commit-id:4bfbdad17d
[formerly9f8cb727a5
] [formerly8485b90ff8
[formerly bf53d06834caa780226121334ac1bcf0534c3f16]] Former-commit-id:8485b90ff8
Former-commit-id:a28d70b5c5
26 lines
601 B
Bash
26 lines
601 B
Bash
#!/bin/sh
|
|
exe=$0
|
|
while test -L "$exe"; do
|
|
exe=`readlink "$exe"`
|
|
done
|
|
bin_dir=`dirname "$exe"`
|
|
bin_dir=`cd "$bin_dir";pwd`
|
|
rs_home_dir=`cd "$bin_dir/..";pwd`
|
|
|
|
pid_file=$rs_home_dir/data/radarserver-pid
|
|
if [ -f $pid_file ]
|
|
then
|
|
pid=`cat "$pid_file"`
|
|
if test -n "$pid"; then
|
|
rm -f "$pid_file"
|
|
if kill "$pid"; then
|
|
echo "Killing radar server at process $pid, also removing pid file."
|
|
exit 0
|
|
fi
|
|
else
|
|
echo "Cannot find pid of radar server, please kill it manually."
|
|
fi
|
|
else
|
|
echo "File does not exist to find pid. It may not be running or it might need to be killed manually."
|
|
fi
|
|
exit 1
|