Unverified Commit 6cc4cd0e authored by Kroese's avatar Kroese Committed by GitHub
Browse files

Refactor closeWeb function

parent 2a8ed106
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -658,15 +658,13 @@ closeBridge() {
}

closeWeb() {
  local pid=""

  # Shutdown nginx
  if [ -s "$WEB_PID" ]; then
  nginx -s stop 2>/dev/null || :
  fWait "nginx"
  fi

  # Shutdown websocket
  local pid=""
  [ -s "$WSD_PID" ] && pid="$(<"$WSD_PID")"
  [ -n "$pid" ] && pKill "$pid" && rm -f "$WSD_PID"