update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERS='5.5.32-06292025'
|
||||
VERS='5.5.33-06302025'
|
||||
NM_BETA=false
|
||||
|
||||
noheader=' test service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns backup-offsitepfsense gui nightlyreview update log betacheck offsite-staticroute-fix '
|
||||
|
||||
@@ -214,11 +214,10 @@ SERVICE_MGMT(){
|
||||
[ ${QUIET} -eq 0 ] && echo -en "${NM_SRVCOPTS[${SERVICE['action']}]}ing on '$nip'... ${idsCL[Default]}"
|
||||
checkhost=$(CHECK_HOST ${nip})
|
||||
if [ "${checkhost}" != "false" ]; then
|
||||
#${NCMD} systemctl ${SERVICE['action']} ${SERVICE['service']} > /dev/null 2>&1
|
||||
if [ ${QUIET} -eq 0 ]; then
|
||||
if [[ "enable,disable" = *"${SERVICE['action']}"* ]] || [ "${SERVICE['service']}" = "daemon-reload" ]; then
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
elif [ "$(${NCMD} systemctl is-active ${SERVICE['service']})" = "active" ]; then
|
||||
elif [ "$(${NCMD} systemctl is-active ${SERVICE['service']} | tr -d $'\r')" = "active" ]; then
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
elif [ "${SERVICE['action']}" = "stop" ]; then
|
||||
echo -e "${idsCL[Red]}STOPPED${idsCL[Default]}"
|
||||
@@ -455,14 +454,14 @@ SERVICE_MGMT(){
|
||||
echo
|
||||
fi
|
||||
if [ ${QUIET} -eq 0 ] && [ "${SERVICE['action']}" != "status" ]; then
|
||||
echo -e "\n ${NCMD} systemctl is-active ${SERVICE['service']}) = active"
|
||||
SStatus=$(${NCMD} systemctl is-active ${SERVICE['service']} | tr -d $'\r')
|
||||
if [[ "enable,disable" = *"${SERVICE['action']}"* ]] || [ "${SERVICE['service']}" = "daemon-reload" ]; then
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
elif [[ "${srva}" = *".socket"* ]] && [ "$(${NCMD} systemctl is-active ${SERVICE['service']})" = "active" ]; then
|
||||
elif [[ "${srva}" = *".socket"* ]] && [ "${SStatus}" = "active" ]; then
|
||||
echo -e "${idsCL[Green]}Done (& socket service)${idsCL[Default]}"
|
||||
elif [[ "${srva}" = *"@pdns"* ]] && [ "$(${NCMD} systemctl is-active ${SERVICE['service']})" = "active" ]; then
|
||||
elif [[ "${srva}" = *"@pdns"* ]] && [ "${SStatus}" = "active" ]; then
|
||||
echo -e "${idsCL[Green]}Done (& @pdns)${idsCL[Default]}"
|
||||
elif [ "$(${NCMD} systemctl is-active ${SERVICE['service']})" = "active" ]; then
|
||||
elif [ "${SStatus}" = "active" ]; then
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
elif [ "${SERVICE['action']}" = "stop" ]; then
|
||||
echo -e "${idsCL[Red]}STOPPED${idsCL[Default]}"
|
||||
|
||||
@@ -616,7 +616,7 @@ STATUS_NODE(){
|
||||
srvcs=${NODETYPE}_SERVICES_CHECK[@];
|
||||
srvcstotest="$(join_by " " ${!srvcs})"
|
||||
if [ "${NODETYPE}" != "OFW" ]; then
|
||||
[ "${NCMD}" != "" ] && srvctst=(`${NCMD} "systemctl is-active ${srvcstotest}"`) || srvctst=(`systemctl is-active ${srvcstotest}`)
|
||||
[ "${NCMD}" != "" ] && srvctst=(`${NCMD} "systemctl is-active ${srvcstotest}" | tr -d $'\r'`) || srvctst=(`systemctl is-active ${srvcstotest}`)
|
||||
fi
|
||||
sr=0
|
||||
|
||||
@@ -654,9 +654,9 @@ STATUS_NODE(){
|
||||
if [ "${NODETYPE}" != "OFW" ]; then
|
||||
srvctest=${srvctst[$sr]}
|
||||
if [ "${srvctest}" != "active" ] && [ "${srvc}" == "mysql" ]; then
|
||||
[ "$(${NCMD} systemctl is-active mariadb)" == "active" ] && mysqlgo=true || mysqlgo=false
|
||||
[ "$(${NCMD} systemctl is-active mariadb | tr -d $'\r')" == "active" ] && mysqlgo=true || mysqlgo=false
|
||||
elif [ "${srvctest}" != "active" ] && [ "${srvc}" == "mariadb" ]; then
|
||||
[ "$(${NCMD} systemctl is-active mysql)" == "active" ] && mysqlgo=true || mysqlgo=false
|
||||
[ "$(${NCMD} systemctl is-active mysql | tr -d $'\r')" == "active" ] && mysqlgo=true || mysqlgo=false
|
||||
elif [ "${srvctest}" == "active" ] && ([ "${srvc}" == "mysql" ] || [ "${srvc}" == "mariadb" ]); then
|
||||
mysqlgo=true
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user