update
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
VERS='5.5.32-06292025'
|
VERS='5.5.33-06302025'
|
||||||
NM_BETA=false
|
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 '
|
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]}"
|
[ ${QUIET} -eq 0 ] && echo -en "${NM_SRVCOPTS[${SERVICE['action']}]}ing on '$nip'... ${idsCL[Default]}"
|
||||||
checkhost=$(CHECK_HOST ${nip})
|
checkhost=$(CHECK_HOST ${nip})
|
||||||
if [ "${checkhost}" != "false" ]; then
|
if [ "${checkhost}" != "false" ]; then
|
||||||
#${NCMD} systemctl ${SERVICE['action']} ${SERVICE['service']} > /dev/null 2>&1
|
|
||||||
if [ ${QUIET} -eq 0 ]; then
|
if [ ${QUIET} -eq 0 ]; then
|
||||||
if [[ "enable,disable" = *"${SERVICE['action']}"* ]] || [ "${SERVICE['service']}" = "daemon-reload" ]; then
|
if [[ "enable,disable" = *"${SERVICE['action']}"* ]] || [ "${SERVICE['service']}" = "daemon-reload" ]; then
|
||||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
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]}"
|
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||||
elif [ "${SERVICE['action']}" = "stop" ]; then
|
elif [ "${SERVICE['action']}" = "stop" ]; then
|
||||||
echo -e "${idsCL[Red]}STOPPED${idsCL[Default]}"
|
echo -e "${idsCL[Red]}STOPPED${idsCL[Default]}"
|
||||||
@@ -455,14 +454,14 @@ SERVICE_MGMT(){
|
|||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
if [ ${QUIET} -eq 0 ] && [ "${SERVICE['action']}" != "status" ]; then
|
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
|
if [[ "enable,disable" = *"${SERVICE['action']}"* ]] || [ "${SERVICE['service']}" = "daemon-reload" ]; then
|
||||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
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]}"
|
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]}"
|
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]}"
|
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||||
elif [ "${SERVICE['action']}" = "stop" ]; then
|
elif [ "${SERVICE['action']}" = "stop" ]; then
|
||||||
echo -e "${idsCL[Red]}STOPPED${idsCL[Default]}"
|
echo -e "${idsCL[Red]}STOPPED${idsCL[Default]}"
|
||||||
|
|||||||
@@ -616,7 +616,7 @@ STATUS_NODE(){
|
|||||||
srvcs=${NODETYPE}_SERVICES_CHECK[@];
|
srvcs=${NODETYPE}_SERVICES_CHECK[@];
|
||||||
srvcstotest="$(join_by " " ${!srvcs})"
|
srvcstotest="$(join_by " " ${!srvcs})"
|
||||||
if [ "${NODETYPE}" != "OFW" ]; then
|
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
|
fi
|
||||||
sr=0
|
sr=0
|
||||||
|
|
||||||
@@ -654,9 +654,9 @@ STATUS_NODE(){
|
|||||||
if [ "${NODETYPE}" != "OFW" ]; then
|
if [ "${NODETYPE}" != "OFW" ]; then
|
||||||
srvctest=${srvctst[$sr]}
|
srvctest=${srvctst[$sr]}
|
||||||
if [ "${srvctest}" != "active" ] && [ "${srvc}" == "mysql" ]; then
|
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
|
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
|
elif [ "${srvctest}" == "active" ] && ([ "${srvc}" == "mysql" ] || [ "${srvc}" == "mariadb" ]); then
|
||||||
mysqlgo=true
|
mysqlgo=true
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user