From b9f7855afc9de6a2ffb488334e51fbac7f2e3151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sat, 16 Nov 2024 20:32:45 +0100 Subject: [PATCH] yt-dlp-ntfy: silent kill command --- yt-dlp-ntfy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt-dlp-ntfy.sh b/yt-dlp-ntfy.sh index dbbe30a..e10008b 100755 --- a/yt-dlp-ntfy.sh +++ b/yt-dlp-ntfy.sh @@ -5,7 +5,7 @@ set -ueo pipefail PID_FILE="/tmp/yt-dlp-ntfy.pid" # Check if the script is already running -if [ -e "$PID_FILE" ] && kill -0 $(cat "$PID_FILE"); then +if [ -e "$PID_FILE" ] && kill -0 $(cat "$PID_FILE") &>/dev/null; then echo "Script is already running. Exiting." exit 1 fi