From c05ba182e98e2926dca984e9ce792f1a5b74cac0 Mon Sep 17 00:00:00 2001 From: Juhyung Park Date: Thu, 17 Oct 2024 13:22:05 +0900 Subject: [PATCH] List installed systemd services, not ones from the repo Whenever we remove a service from this repo, we need this change to remove residue from the system. Signed-off-by: Juhyung Park --- README.md | 2 +- install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e446426..f8f2d72 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ Please add firewall rules and apply https proxy and secure your Immich instance. # Run as root! # Remove Immich systemd services -for i in immich*.service; do +systemctl list-unit-files --type=service | grep "^immich" | while read i unused; do systemctl stop $i systemctl disable $i done diff --git a/install.sh b/install.sh index 035a37e..6d63b49 100755 --- a/install.sh +++ b/install.sh @@ -10,7 +10,7 @@ APP=$IMMICH_PATH/app if [[ "$USER" != "immich" ]]; then # Disable systemd services, if installed ( - for i in immich*.service; do + systemctl list-unit-files --type=service | grep "^immich" | while read i unused; do systemctl stop $i && \ systemctl disable $i && \ rm /*/systemd/system/$i &&