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
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -21,11 +21,13 @@ done
KILLED_TOR=false
if [ -f "./data/tor/tor.pid" ]; then
  PID=`cat ./data/tor/tor.pid`
  if kill -0 "$PID" 2>/dev/null; then # it is a running process and we may send signals to it
    kill $PID
    if [ $? -eq 0 ]; then
      KILLED_TOR=true
    fi
  fi
fi

sleep 5