Update dsmon.sh
This commit is contained in:
4
dsmon.sh
4
dsmon.sh
@@ -542,7 +542,7 @@ GETCRONTABS(){
|
|||||||
# echo -e "${idsST[Bold]}${idsCL[LightCyan]} ${host_name[$hostid]} - ${host_ip[$hostid]}${idsCL[Default]}${idsST[Reset]}"
|
# echo -e "${idsST[Bold]}${idsCL[LightCyan]} ${host_name[$hostid]} - ${host_ip[$hostid]}${idsCL[Default]}${idsST[Reset]}"
|
||||||
checkhost=$(CHECK_HOST ${host_ip[$hostid]})
|
checkhost=$(CHECK_HOST ${host_ip[$hostid]})
|
||||||
if [ "${checkhost}" != "false" ]; then
|
if [ "${checkhost}" != "false" ]; then
|
||||||
${SSHCMD} root@${host_ip[$hostid]} dsmon get-crontab ${rtpsswd} &
|
${SSHCMD} root@${host_ip[$hostid]} dsmon get-crontab ${rtpsswd} & > /dev/null 2>&1
|
||||||
else
|
else
|
||||||
echo -e "${idsST[Bold]}${idsCL[Red]} ${host_name[$hostid]} - Timeout${idsCL[Default]}${idsST[Reset]}"
|
echo -e "${idsST[Bold]}${idsCL[Red]} ${host_name[$hostid]} - Timeout${idsCL[Default]}${idsST[Reset]}"
|
||||||
fi
|
fi
|
||||||
@@ -563,7 +563,7 @@ GETCRONTAB(){
|
|||||||
if [ "${nmip}" != "" ]; then
|
if [ "${nmip}" != "" ]; then
|
||||||
while read host hostname; do
|
while read host hostname; do
|
||||||
if [ "${host}" != "host" ] && [ "${host}" != "" ]; then
|
if [ "${host}" != "host" ] && [ "${host}" != "" ]; then
|
||||||
echo -e "${idsST[Bold]}${idsCL[LightCyan]} ${host_name[$hostid]} - Gathering Crontabs, and copycerts.sh if it exists ... ${idsCL[Default]}${idsST[Reset]}"
|
echo -e "${idsST[Bold]}${idsCL[LightCyan]} ${host} - Gathering Crontabs, and copycerts.sh if it exists ... ${idsCL[Default]}${idsST[Reset]}"
|
||||||
# echo -e "${SERVERMON_ID}) ${host} : ${hostname}\nmysqlip=${mysqlip}\n"
|
# echo -e "${SERVERMON_ID}) ${host} : ${hostname}\nmysqlip=${mysqlip}\n"
|
||||||
crontab -l | sshpass -p${1} ${SSHCMD} -o 'StrictHostKeyChecking no' nm_crontab_user@${nmip} "cat > ${DS_CRONTAB_FOLDER}/${host}.crontab"
|
crontab -l | sshpass -p${1} ${SSHCMD} -o 'StrictHostKeyChecking no' nm_crontab_user@${nmip} "cat > ${DS_CRONTAB_FOLDER}/${host}.crontab"
|
||||||
if [ -f /opt/copycerts.sh ]; then
|
if [ -f /opt/copycerts.sh ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user