Skip to content

Commit 3468957

Browse files
authored
Update wp-post.sh
1 parent 8dbd050 commit 3468957

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wordpress/wp-post.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ resolve_host() {
9898
local result=()
9999

100100
# Try to get IPv4 address
101-
ipv4=$(ping -4 -c 1 "$host" | awk -F'[()]' '{print $2}' | head -n 1)
101+
ipv4="$(ping -4 -c 1 "$host" | awk -F'[()]' '{print $2}' | head -n 1)"
102102
103103
# Fallback to find IP
104-
ip_fallback=$(getent hosts "${host}" | awk '{ print $1 }')
104+
ip_fallback="$(getent hosts "${host}" | awk '{ print $1 }')"
105105
106106
# No IP found
107107
if [[ -z "${ipv4}" && -z "${ip_fallback}" ]]; then

0 commit comments

Comments
 (0)