Update dsmon.sh

This commit is contained in:
2025-07-06 09:30:30 -05:00
parent c659f514b7
commit 9ad0f8cc19

View File

@@ -568,6 +568,8 @@ GETCRONTAB(){
crontab -l | sshpass -p${1} ${SSHCMD} -o 'StrictHostKeyChecking no' nm_crontab_user@${nmip} "cat > ${DS_CRONTAB_FOLDER}/${host}.crontab" > /dev/null 2>&1
if [ -f /opt/copycerts.sh ]; then
sshpass -p${1} scp /opt/copycerts.sh nm_crontab_user@${nmip}:${DS_COPYCERTS_FOLDER}/${host}_copycerts.sh > /dev/null 2>&1
elif [ -f /opt/idssys/nodemgmt/conf/copycerts.sh.inc ]; then
sshpass -p${1} scp /opt/idssys/nodemgmt/conf/copycerts.sh.inc nm_crontab_user@${nmip}:${DS_COPYCERTS_FOLDER}/${host}_copycerts.sh.inc > /dev/null 2>&1
fi
fi
done <<< $(MYSQL_PWD="sysmoninsert" ${mysqlcmd} ${mysql_conn} -u sysmoninsert -e "SELECT host,hostname FROM servermonitor.hosts WHERE id=${SERVERMON_ID}")