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