Update services.inc

This commit is contained in:
2023-11-01 21:07:03 -05:00
parent 26793e6aa3
commit 8064a9f044

View File

@@ -325,8 +325,14 @@ SERVICE(){
checkhost=$(CHECK_HOST ${nip})
if [ "${checkhost}" != "false" ]; then
[ "${1}" = "pdnsadmin" ] && srva="pdnsadmin.socket pdnsadmin.service" || srva=${1}
$NCMD systemctl ${2} ${srva} >/dev/null 2>&1
if [ "${3}" != "q" ]; then
if [ "${2}" != "status" ]; then
$NCMD systemctl ${2} ${srva} >/dev/null 2>&1
else
echo
$NCMD systemctl ${2} ${srva}
echo
fi
if [ "${3}" != "q" ] && [ "${2}" != "status" ]; then
if [[ "enable,disable" = *"${2}"* ]] || [ "${1}" = "daemon-reload" ]; then
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
elif [ "$(${NCMD} systemctl is-active ${1})" = "active" ]; then