From 2c461524137d15ddefa903e9d26b1788f3b76e1f Mon Sep 17 00:00:00 2001 From: "Bastian (BaM)" Date: Sat, 13 Sep 2025 17:02:19 +0200 Subject: [PATCH] Update --- auto-boot-ollama-pc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auto-boot-ollama-pc.sh b/auto-boot-ollama-pc.sh index 3e203b6..611031d 100755 --- a/auto-boot-ollama-pc.sh +++ b/auto-boot-ollama-pc.sh @@ -15,8 +15,8 @@ NC_CMD="nc" # netcat DOCKER="docker" # Ensure only one instance of this script is running -if pgrep -f $SCRIPTNAME 1>/dev/null; then - echo "Killing running instance of $SCRIPTNAME..." +if [ "$(pgrep -f $SCRIPTNAME)" != $$ ]; then + echo "Killing running instance of $SCRIPTNAME..." pgrep -f -- "$SCRIPTNAME" | grep -vw "$$" | xargs -r kill -KILL fi