Update nodemgmt-scripts.sh
This commit is contained in:
@@ -181,12 +181,8 @@ STATUS(){
|
||||
echo -en " ${NM_SERVICES[${srvc}]}$spc: "
|
||||
fi
|
||||
srvctst=$(${NCMD} systemctl is-active ${srvc})
|
||||
echo "${NCMD} systemctl is-active ${srvc} = ${srvctst}"
|
||||
if [ "${srvctst}" = "active" ]; then
|
||||
echo "yes"
|
||||
else
|
||||
echo "no"
|
||||
fi
|
||||
#echo "${NCMD} systemctl is-active ${srvc} = ${srvctst}"
|
||||
#if [ "${srvctst}" = "active" ]; then echo "yes"; else echo "no"; fi
|
||||
if [ "${srvctst}" != "active" ] && [ "${srvc}" = "mysql" ]; then
|
||||
mysqlgo=false;
|
||||
[ "$(${NCMD} systemctl is-active mariadb)" = "active" ] && mysqlgo=true;
|
||||
@@ -196,9 +192,8 @@ STATUS(){
|
||||
elif [ "${srvctst}" = "active" ] && ([ "${srvc}" = "mysql" ] || [ "${srvc}" = "mariadb" ]); then
|
||||
mysqlgo=true
|
||||
fi
|
||||
echo "mysqlgo=${mysqlgo}"
|
||||
#echo "mysqlgo=${mysqlgo}"
|
||||
if [ "{srvctst}" != "active" ] && [ "${mysqlgo}" != "true" ]; then
|
||||
echo "1"
|
||||
if [ ! -f ${FOLDER}/${nip}-${srvc}.down ]; then
|
||||
|
||||
if [ "${ST_ACTION}" != "check" ]; then
|
||||
@@ -225,7 +220,6 @@ STATUS(){
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "2"
|
||||
if [ "${ST_ACTION}" != "check" ]; then
|
||||
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user