add minion name to log, update comment

This commit is contained in:
m0duspwnens
2023-10-26 13:19:04 -04:00
parent 6891a95254
commit 7e8f3b753f

View File

@@ -152,12 +152,12 @@ check_salt_master_status() {
return 0 return 0
} }
# this is only intended to be used to check the status of the minion # this is only intended to be used to check the status of the minion from a salt master
check_salt_minion_status() { check_salt_minion_status() {
local minion="$1" local minion="$1"
local timeout="${2:-5}" local timeout="${2:-5}"
local logfile="${3:-'/dev/stdout'}" local logfile="${3:-'/dev/stdout'}"
echo "Checking if the salt minion will respond to jobs" >> "$logfile" 2>&1 echo "Checking if the salt minion: $minion will respond to jobs" >> "$logfile" 2>&1
salt "$minion" test.ping -t $timeout > /dev/null 2>&1 salt "$minion" test.ping -t $timeout > /dev/null 2>&1
local status=$? local status=$?
if [ $status -gt 0 ]; then if [ $status -gt 0 ]; then