Skip to content

Commit 7491d3c

Browse files
committed
Fix remarks
1 parent 115536a commit 7491d3c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

bin/v-update-sys-ip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if [ -z "$physical_nics" ]; then
4646
fi
4747

4848
for 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

install/hst-install-debian.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2076,7 +2076,7 @@ $HESTIA/bin/v-update-sys-ip > /dev/null 2>&1
20762076
# Get primary IP
20772077
default_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)"
20822082
ip="$primary_ipv4"

src/deb/nginx/hestia

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)