diff --git a/release_version.txt b/release_version.txt index ac7a34b..f5b5629 100644 --- a/release_version.txt +++ b/release_version.txt @@ -1 +1 @@ -1.9.5,homestore ==> hs01 +1.9.6,storage healthcheck - ignore known_hosts diff --git a/scripts/healthcheck/storage_health_check.sh b/scripts/healthcheck/storage_health_check.sh index a72528e..8077884 100755 --- a/scripts/healthcheck/storage_health_check.sh +++ b/scripts/healthcheck/storage_health_check.sh @@ -19,13 +19,13 @@ get_user_hosts() { local Domain=${2} Cmd="curl -s http://cloud23.cvtt.vpn:6789/admin/cvtt_hosts" - Cmd="${Cmd} | ${HOME}/bin/hjson -j" - Cmd="${Cmd} | jq -r" - Cmd="${Cmd} --arg domain \"${Domain}\"" - Cmd="${Cmd} --arg usr \"${User}\"" - Cmd="${Cmd} '.[\$domain] | to_entries[] | select(.value.users[] | contains(\$usr)) | .key'" + Cmd+=" | ${HOME}/bin/hjson -j" + Cmd+=" | jq -r" + Cmd+=" --arg domain \"${Domain}\"" + Cmd+=" --arg usr \"${User}\"" + Cmd+=" '.[\$domain] | to_entries[] | select(.value.users[] | contains(\$usr)) | .key'" - Cmd="${Cmd} | sed 's/\$/.${Domain}/'" + Cmd+=" | sed 's/\$/.${Domain}/'" eval ${Cmd} } @@ -66,13 +66,16 @@ function storage_check() { else port=22 fi - Cmd="ssh -p ${port} $host" - Cmd="${Cmd} eval \"df -hTl" - Cmd="${Cmd} -x squashfs" - Cmd="${Cmd} -x tmpfs" - Cmd="${Cmd} -x vfat" - Cmd="${Cmd} -x devtmpfs" - Cmd="${Cmd} | grep -v Filesystem\"" + Cmd="ssh -p ${port}" + Cmd+=" -o StrictHostKeyChecking=no" + Cmd+=" -o UserKnownHostsFile=/dev/null" + Cmd+=" $host" + Cmd+=" eval \"df -hTl" + Cmd+=" -x squashfs" + Cmd+=" -x tmpfs" + Cmd+=" -x vfat" + Cmd+=" -x devtmpfs" + Cmd+=" | grep -v Filesystem\"" IFS=$'\n' ; lines=$(eval ${Cmd}) for ln in $lines