From d88562e6a0c5db1b1428ab20df89ed6ed309c06b Mon Sep 17 00:00:00 2001 From: bryan Date: Fri, 24 Mar 2023 19:43:55 -0400 Subject: [PATCH] Fix service creation --- installJRMC | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installJRMC b/installJRMC index 282dd9f..86b2479 100755 --- a/installJRMC +++ b/installJRMC @@ -1194,7 +1194,7 @@ setServiceVars() { declare -ga RELOAD ENABLE DISABLE IS_ENABLED IS_ACTIVE declare -a systemctl_prefix declare service_name="$1" - declare service_type="${2:-${SERVICE_TYPE:-system}}" + declare service_type="${SERVICE_TYPE:-${2:-system}}" declare service_dir="/usr/lib/systemd/$service_type" if [[ $USER == "root" && $service_type == "user" ]]; then @@ -1231,7 +1231,7 @@ setServiceVars() { ;; esac - if [[ $SERVICE_TYPE == "system" && $USER != "root" ]]; then + if [[ $service_type == "system" && $USER != "root" ]]; then SERVICE_FNAME="$service_dir/$service_name@.service" TIMER_FNAME="$service_dir/$service_name@.timer" SERVICE_NAME="$service_name@$USER.service"