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