diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 82629446..d1bd6dd0 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -161,8 +161,10 @@ case "$1" in elif [ "${srvc}" = "maxscale" ]; then SER='MaxScale:' else SER="${2}" fi - if [ $(${NCMD} pgrep ${srvc} | wc -l) -lt "1" ]; then - echo "${SER} is down" | mail -s "iDS-Node${nid}-${nip}" alerts2external@schroedercity.com + if [ "${STATUS_CHECK_EMAIL}" != "" ]; then + if [ $(${NCMD} pgrep ${srvc} | wc -l) -lt "1" ]; then + echo "${SER} is down" | mail -s "iDS-Node${nid}" ${STATUS_CHECK_EMAIL} + fi fi done nid=`expr $nid + 1` diff --git a/run.sh b/run.sh index 29e49b20..10923e85 100755 --- a/run.sh +++ b/run.sh @@ -11,7 +11,7 @@ if [ "$1" != "service" ] && [ "$1" != "status" ] && [ "$1" != "status-check" ]; echo "" echo -e "${idsCL[Yellow]} NodeMgmt - Galera/NGINX Node Management${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}" echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}" - echo -e "Node hostname: ${node_hostname}" + echo -e "Node hostname: ${NODE_HOSTNAME}" for srvc in "${NODE_SERVICES[@]}" do if [ "${srvc}" = "mysql" ]; then SER='MySQL: '