From 48ea1d4a40d0caa382704497c9c42dc92ae82b55 Mon Sep 17 00:00:00 2001 From: bryan Date: Wed, 24 Nov 2021 15:33:13 -0500 Subject: [PATCH] Improve uninstall() --- installJRMC | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/installJRMC b/installJRMC index 9270d34..15df05f 100755 --- a/installJRMC +++ b/installJRMC @@ -1153,10 +1153,9 @@ uninstall() { echo "Stopping and removing all associated Media Center services" for _service in $(compgen -A "function" "service"); do _service="${_service##service_}" - echo "$_service" setServiceVars "$_service" for unit in "$_service."{service,timer}; do - if systemctl is-active -q "$unit" || systemctl is-enabled -q "$unit"; then + if systemctl is-active -q "$unit" > /dev/null 2>&1 || systemctl is-enabled -q "$unit" > /dev/null 2>&1; then debug "Disabling $unit" systemctl_disable "$unit" fi