Skip to content

Commit 600b759

Browse files
Resolved healthcheck script issue where output wasn't being generated.
1 parent b26c79d commit 600b759

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

health-check.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ echo "The Health Check Report has been saved in tmp/ folder." | tee -a "$logfile
3030
# Extract valid remote hostnames from /etc/hosts
3131
remote_hosts=$(awk '$1 ~ /^[0-9]+(\.[0-9]+){3}$/ && $2 !~ /localhost/ {print $2}' /etc/hosts | sort -u)
3232

33+
if [ -z "$remote_hosts" ]; then
34+
remote_hosts=$(hostname)
35+
fi
36+
3337
collect_from_all_hosts() {
3438
local cmd="$1"
3539
local file_prefix="$2"

0 commit comments

Comments
 (0)