Unverified Commit 095e6187 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

feat: Make webserver optional (#1012)

parent 57a902ad
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -326,7 +326,7 @@ closeBridge() {

closeNetwork() {

  if [[ "$DHCP" == [Yy1]* ]]; then
  if [[ "${WEB:-}" != [Nn]* && "$DHCP" == [Yy1]* ]]; then

    # Shutdown nginx
    nginx -s stop 2> /dev/null
@@ -504,10 +504,14 @@ else
    checkOS
  fi

  if [[ "${WEB:-}" != [Nn]* ]]; then

    # Shutdown nginx
    nginx -s stop 2> /dev/null
    fWait "nginx"

  fi

  if [[ "${NETWORK,,}" != "user"* ]]; then

    # Configure for tap interface
+15 −10
Original line number Diff line number Diff line
@@ -189,6 +189,11 @@ addPackage() {
  return 0
}

cp -r /var/www/* /run/shm
html "Starting $APP for Docker..."

if [[ "${WEB:-}" != [Nn]* ]]; then
 
  # shellcheck disable=SC2143
  if [ -f /proc/net/if_inet6 ] && [ -n "$(ifconfig -a | grep inet6)" ]; then

@@ -201,8 +206,8 @@ else
  fi
  
  # Start webserver
cp -r /var/www/* /run/shm
html "Starting $APP for Docker..."
  nginx -e stderr

fi

return 0