From 99feaa34d2eda6ab41c702320153a135efb5d91a Mon Sep 17 00:00:00 2001 From: bparkin1283 Date: Sun, 10 Aug 2025 23:07:27 -0500 Subject: [PATCH] Replace `service --status-all` with `systemctl is-active` --- distribution/debian/install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/distribution/debian/install.sh b/distribution/debian/install.sh index f350436ed..c3f407799 100755 --- a/distribution/debian/install.sh +++ b/distribution/debian/install.sh @@ -7,6 +7,7 @@ ### Version V1.0.2 2024-01-03 - markus101 - Get user input from /dev/tty ### Version V1.0.3 2024-01-06 - StevieTV - exit script when it is ran from install directory ### Version V1.0.4 2025-04-05 - kaecyra - Allow user/group to be supplied via CLI, add unattended mode +### Version V1.0.5 2025-07-08 - bparkin1283 - use systemctl instead of service for stopping app ### Boilerplate Warning #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, @@ -167,11 +168,10 @@ if ! getent group "$app_guid" | grep -qw "$app_uid"; then echo "Added User [$app_uid] to Group [$app_guid]" fi -# Stop the App if running -if service --status-all | grep -Fq "$app"; then - systemctl stop "$app" - systemctl disable "$app".service - echo "Stopped existing $app" +# Stop and disable the App if running +if [ $(systemctl is-active "$app") = "active" ]; then + systemctl disable --now -q "$app" + echo "Stopped and disabled existing $app" fi # Create Appdata Directory