Update nodemgmt-scripts.sh
This commit is contained in:
@@ -21,7 +21,6 @@ case "$1" in
|
|||||||
echo -e "${idsCL[Red]}(${3}) is not an allowed service action.${idsCL[Default]}"
|
echo -e "${idsCL[Red]}(${3}) is not an allowed service action.${idsCL[Default]}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ "${NM_SERVICES[${2}]}" = "" ]; then NM_SERVICES[${2}]="${srvc}"; fi
|
|
||||||
if [ "$3" = "stop" ]; then ADISP='Stopp';
|
if [ "$3" = "stop" ]; then ADISP='Stopp';
|
||||||
elif [ "$3" = "enable" ]; then ADISP='Enabl';
|
elif [ "$3" = "enable" ]; then ADISP='Enabl';
|
||||||
elif [ "$3" = "disable" ]; then ADISP='Disabl';
|
elif [ "$3" = "disable" ]; then ADISP='Disabl';
|
||||||
@@ -110,7 +109,6 @@ case "$1" in
|
|||||||
|
|
||||||
for srvc in "${NODE_SERVICES[@]}"
|
for srvc in "${NODE_SERVICES[@]}"
|
||||||
do
|
do
|
||||||
if [ "${NM_SERVICES[${srvc}]}" = "" ]; then NM_SERVICES[${srvc}]="${srvc}"; fi
|
|
||||||
echo -en "${NM_SERVICES[${srvc}]} "
|
echo -en "${NM_SERVICES[${srvc}]} "
|
||||||
if [ $(${NCMD} pgrep ${srvc} | wc -l) -gt "0" ]; then
|
if [ $(${NCMD} pgrep ${srvc} | wc -l) -gt "0" ]; then
|
||||||
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
|
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
|
||||||
@@ -133,7 +131,6 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
for srvc in "${NODE_SERVICES[@]}"
|
for srvc in "${NODE_SERVICES[@]}"
|
||||||
do
|
do
|
||||||
if [ "${NM_SERVICES[${srvc}]}" = "" ]; then NM_SERVICES[${srvc}]="${srvc}"; fi
|
|
||||||
if [ "${STATUS_CHECK_EMAIL}" != "" ]; then
|
if [ "${STATUS_CHECK_EMAIL}" != "" ]; then
|
||||||
if [ $(${NCMD} pgrep ${srvc} | wc -l) -lt "1" ]; then
|
if [ $(${NCMD} pgrep ${srvc} | wc -l) -lt "1" ]; then
|
||||||
echo "${NM_SERVICES[${srvc}]} is down" | mail -s "iDS-Node${nid}-${nip}" ${STATUS_CHECK_EMAIL}
|
echo "${NM_SERVICES[${srvc}]} is down" | mail -s "iDS-Node${nid}-${nip}" ${STATUS_CHECK_EMAIL}
|
||||||
|
|||||||
Reference in New Issue
Block a user