Procházet zdrojové kódy

Squashed service_type bug

bryan před 3 roky
rodič
revize
d8c452eb4d
1 změnil soubory, kde provedl 2 přidání a 5 odebrání
  1. 2 5
      installJRMC

+ 2 - 5
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"