From d8c452eb4d7a421d2351d8926402e47455b54675 Mon Sep 17 00:00:00 2001 From: bryan Date: Wed, 12 Jan 2022 12:56:28 -0500 Subject: [PATCH] Squashed service_type bug --- installJRMC | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/installJRMC b/installJRMC index f59e641..12dd26c 100755 --- a/installJRMC +++ b/installJRMC @@ -906,9 +906,7 @@ setServiceVars() { return 1 fi - echo "$SERVICE_TYPE" - - if [[ "$SERVICE_TYPE" == "system" ]]; then + if [[ "$service_type" == "system" ]]; then service_dir="$service_system_dir" EXEC_USER="root" systemctl_reload_cmd(){ sudo systemctl daemon-reload; } @@ -916,7 +914,7 @@ setServiceVars() { systemctl_disable_cmd(){ sudo systemctl disable --now "$@"; } systemctl_is_enabled_cmd(){ sudo systemctl is-enabled -q "$@"; } systemctl_is_active_cmd(){ sudo systemctl is-active -q "$@"; } - elif [[ "$SERVICE_TYPE" == "user" ]]; then + elif [[ "$service_type" == "user" ]]; then service_dir="$service_user_dir" EXEC_USER="$USER" systemctl_reload_cmd(){ systemctl --user daemon-reload; } @@ -1506,7 +1504,6 @@ main() { if ! setServiceVars "$service"; then continue fi - if ! "service_$service"; then if [[ $? -eq 127 ]]; then err "Service $service does not exist, check your service name"