mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-10-12 13:45:02 +08:00
feat: Make webserver optional (#1012)
This commit is contained in:
parent
57a902ad9f
commit
095e618785
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user