Update dsmon.sh

This commit is contained in:
2024-01-06 09:54:41 -06:00
parent 0de33b2322
commit 639e61b888

View File

@@ -396,13 +396,13 @@ GETCRONTABS(){
for hostid in "${!host_ip[@]}"; do
echo -e "${idsST[Bold]}${idsCL[LightCyan]} ${host_name[$hostid]} - ${host_ip[$hostid]}${idsCL[Default]}${idsST[Reset]}"
# checkhost=$(CHECK_HOST ${host_ip[$hostid]})
# if [ "${checkhost}" != "false" ]; then
# echo -en "${idsST[Bold]}${idsCL[LightCyan]} ${host_name[$hostid]} - Gathering Crontabs ... ${idsCL[Default]}${idsST[Reset]}"
# ssh -tq root@${host_ip[$hostid]} dsmon get-crontab ${rtpsswd}
# else
# echo -e "${idsST[Bold]}${idsCL[Red]} ${host_name[$hostid]} - Timeout${idsCL[Default]}${idsST[Reset]}"
# fi
checkhost=$(CHECK_HOST ${host_ip[$hostid]})
if [ "${checkhost}" != "false" ]; then
echo -en "${idsST[Bold]}${idsCL[LightCyan]} ${host_name[$hostid]} - Gathering Crontabs ... ${idsCL[Default]}${idsST[Reset]}"
ssh -tq root@${host_ip[$hostid]} dsmon get-crontab ${rtpsswd} &
else
echo -e "${idsST[Bold]}${idsCL[Red]} ${host_name[$hostid]} - Timeout${idsCL[Default]}${idsST[Reset]}"
fi
done
echo