mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-11-09 03:23:40 +08:00
Compare commits
2 Commits
v7.37
...
095e618785
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
095e618785 | ||
|
|
57a902ad9f |
@@ -152,7 +152,18 @@ getUserPorts() {
|
||||
list="${list%% }"
|
||||
|
||||
for port in $list; do
|
||||
args+="hostfwd=tcp::$port-$VM_NET_IP:$port,"
|
||||
proto="tcp"
|
||||
num="$port"
|
||||
|
||||
if [[ "$port" == */udp ]]; then
|
||||
proto="udp"
|
||||
num="${port%/udp}"
|
||||
elif [[ "$port" == */tcp ]]; then
|
||||
proto="tcp"
|
||||
num="${port%/tcp}"
|
||||
fi
|
||||
|
||||
args+="hostfwd=$proto::$num-$VM_NET_IP:$num,"
|
||||
done
|
||||
|
||||
echo "${args%?}"
|
||||
@@ -315,7 +326,7 @@ closeBridge() {
|
||||
|
||||
closeNetwork() {
|
||||
|
||||
if [[ "$DHCP" == [Yy1]* ]]; then
|
||||
if [[ "${WEB:-}" != [Nn]* && "$DHCP" == [Yy1]* ]]; then
|
||||
|
||||
# Shutdown nginx
|
||||
nginx -s stop 2> /dev/null
|
||||
@@ -493,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
|
||||
|
||||
Reference in New Issue
Block a user