feat: Make webserver optional (#1012)

This commit is contained in:
Kroese 2025-09-18 23:45:05 +02:00 committed by GitHub
parent 57a902ad9f
commit 095e618785
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 23 additions and 14 deletions

View File

@ -326,7 +326,7 @@ closeBridge() {
closeNetwork() { closeNetwork() {
if [[ "$DHCP" == [Yy1]* ]]; then if [[ "${WEB:-}" != [Nn]* && "$DHCP" == [Yy1]* ]]; then
# Shutdown nginx # Shutdown nginx
nginx -s stop 2> /dev/null nginx -s stop 2> /dev/null
@ -504,10 +504,14 @@ else
checkOS checkOS
fi fi
if [[ "${WEB:-}" != [Nn]* ]]; then
# Shutdown nginx # Shutdown nginx
nginx -s stop 2> /dev/null nginx -s stop 2> /dev/null
fWait "nginx" fWait "nginx"
fi
if [[ "${NETWORK,,}" != "user"* ]]; then if [[ "${NETWORK,,}" != "user"* ]]; then
# Configure for tap interface # Configure for tap interface

View File

@ -189,6 +189,11 @@ addPackage() {
return 0 return 0
} }
cp -r /var/www/* /run/shm
html "Starting $APP for Docker..."
if [[ "${WEB:-}" != [Nn]* ]]; then
# shellcheck disable=SC2143 # shellcheck disable=SC2143
if [ -f /proc/net/if_inet6 ] && [ -n "$(ifconfig -a | grep inet6)" ]; then if [ -f /proc/net/if_inet6 ] && [ -n "$(ifconfig -a | grep inet6)" ]; then
@ -201,8 +206,8 @@ else
fi fi
# Start webserver # Start webserver
cp -r /var/www/* /run/shm
html "Starting $APP for Docker..."
nginx -e stderr nginx -e stderr
fi
return 0 return 0