Commit d97b0527 authored by Peter Palfrader's avatar Peter Palfrader Committed by aagbsn
Browse files

Only try to kill tor if it is our process and it exists

parent f0b02bb4
...@@ -21,9 +21,11 @@ done ...@@ -21,9 +21,11 @@ done
if [ -f "./data/tor/" ]; then if [ -f "./data/tor/" ]; then
PID=`cat ./data/tor/` PID=`cat ./data/tor/`
kill $PID if kill -0 "$PID" 2>/dev/null; then # it is a running process and we may send signals to it
if [ $? -eq 0 ]; then kill $PID
KILLED_TOR=true if [ $? -eq 0 ]; then
fi fi
fi fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment