Update nodemgmt-scripts.sh

This commit is contained in:
2023-04-23 13:25:35 -05:00
parent 708d56fbad
commit 5b85b13bf8

View File

@@ -2497,13 +2497,13 @@ UPDATEPUSHOVERINFO(){
ssh root@${host_ip[$hostid]} "/bin/sed -i '/PUSHOVER_/d' /opt/idssys/nodemgmt/settings.conf"
if [ "${PUSHOVER_APP_TOKEN}" != "" ]; then
echo "putting in info 'root@${host_ip[$hostid]}'"
ssh root@${host_ip[$hostid]} "echo PUSHOVER_APP_TOKEN=\"${PUSHOVER_APP_TOKEN}\" >> ${MMFOLDER}/settings.conf"
ssh root@${host_ip[$hostid]} "echo PUSHOVER_APP_TOKEN=\\\"${PUSHOVER_APP_TOKEN}\\\" >> ${MMFOLDER}/settings.conf; echo 'yes1'"
else
echo "taking out info"
ssh root@${host_ip[$hostid]} "echo \# PUSHOVER_APP_TOKEN=\\\"\\\" >> ${MMFOLDER}/settings.conf"
fi
if [ "${PUSHOVER_USER_TOKEN}" != "" ]; then
ssh root@${host_ip[$hostid]} "echo PUSHOVER_USER_TOKEN=\\\"${PUSHOVER_USER_TOKEN}\\\" >> ${MMFOLDER}/settings.conf"
ssh root@${host_ip[$hostid]} "echo PUSHOVER_USER_TOKEN=\\\"${PUSHOVER_USER_TOKEN}\\\" >> ${MMFOLDER}/settings.conf; echo 'yes2'"
else
ssh root@${host_ip[$hostid]} "echo \# PUSHOVER_USER_TOKEN=\\\"\\\" >> ${MMFOLDER}/settings.conf"
fi