File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ if [ -z "$physical_nics" ]; then
4646fi
4747
4848for nic in $physical_nics ; do
49- nic_ipv4s=" $( ip -4 -d -j addr show " $nic " | jq -r ' .[] | select(length > 0) | .addr_info[] | if .scope == "global" then .local else empty end' ) ; "
49+ nic_ipv4s=" $( ip -4 -d -j addr show " $nic " | jq -r ' .[] | select(length > 0) | .addr_info[] | if .scope == "global" then .local else empty end' ) "
5050 if [ -z " $ips " ]; then
5151 ips=" $nic_ipv4s "
5252 else
Original file line number Diff line number Diff line change @@ -2076,7 +2076,7 @@ $HESTIA/bin/v-update-sys-ip > /dev/null 2>&1
20762076# Get primary IP
20772077default_nic=" $( ip -d -j route show | jq -r ' .[] | if .dst == "default" then .dev else empty end' ) "
20782078# IPv4
2079- primary_ipv4=" $( ip -4 -d -j addr show " $default_nic " | jq -r ' .[].addr_info[] | if .scope == "global" then .local else empty end' | head -n1) "
2079+ primary_ipv4=" $( ip -4 -d -j addr show " $default_nic " | jq -r ' .[] | select(length > 0) | .addr_info[] | if .scope == "global" then .local else empty end' | head -n1) "
20802080# IPv6
20812081# primary_ipv6="$(ip -6 -d -j addr show "$default_nic" | jq -r '.[].addr_info[] | if .scope == "global" then .local else empty end' | head -n1)"
20822082ip=" $primary_ipv4 "
Original file line number Diff line number Diff line change @@ -39,10 +39,10 @@ adapt_nginx_config() {
3939 fi
4040 for nic in $physical_nics ; do
4141 if [ -z " $ipv4_scope_global " ]; then
42- ipv4_scope_global=" $( ip -4 -d -j addr show " $nic " | jq -r ' .[] | select(length > 0) | .addr_info[] | if .scope == "global" then .local else empty end' ) ; "
42+ ipv4_scope_global=" $( ip -4 -d -j addr show " $nic " | jq -r ' .[] | select(length > 0) | .addr_info[] | if .scope == "global" then .local else empty end' ) "
4343 fi
4444 if [ -z " $ipv6_scope_global " ]; then
45- ipv6_scope_global=" $( ip -6 -d -j addr show " $nic " | jq -r ' .[] | select(length > 0) | .addr_info[] | if .scope == "global" then .local else empty end' ) ; "
45+ ipv6_scope_global=" $( ip -6 -d -j addr show " $nic " | jq -r ' .[] | select(length > 0) | .addr_info[] | if .scope == "global" then .local else empty end' ) "
4646 fi
4747 done
4848
You can’t perform that action at this time.
0 commit comments