update
This commit is contained in:
@@ -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]}"
|
||||
|
||||
Reference in New Issue
Block a user