yt-dlp-ntfy: silent kill command

This commit is contained in:
Lukáš Kucharczyk 2024-11-16 20:32:45 +01:00
parent eaa9059fb5
commit b9f7855afc
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
1 changed files with 1 additions and 1 deletions

View File

@ -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