From 7eef1c067a9b845a6e302d749189bd1be8f469cc Mon Sep 17 00:00:00 2001 From: DaanSelen Date: Wed, 4 Feb 2026 17:00:23 +0100 Subject: [PATCH] try: to fix killing --- manage.sh | 2 +- service-files/presentation.service | 2 +- service-files/video.service | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manage.sh b/manage.sh index 672c129..1fc9b83 100755 --- a/manage.sh +++ b/manage.sh @@ -67,7 +67,7 @@ case "$3" in fi if [[ "$2" == "video" ]]; then media_file=$(find /opt/raspscreen/media \( -name "*.mp4" -o -name "*.mkv" -o -name "*.mov" -o -name "*.webm" \)) - + if [[ -z "$media_file" ]]; then echo "No compatible media file found. Wrong mode?" echo "Exiting in 20 seconds..." diff --git a/service-files/presentation.service b/service-files/presentation.service index c9173f6..8f8d24b 100644 --- a/service-files/presentation.service +++ b/service-files/presentation.service @@ -9,7 +9,7 @@ Environment=DISPLAY=:0 WorkingDirectory=/opt/raspscreen ExecStartPre=/usr/bin/sleep 5 ExecStart=/opt/raspscreen/bin/manage.sh start presentation --foreground -ExecStop=/opt/raspscreen/bin/manage kill video +ExecStop=/opt/raspscreen/bin/manage.sh kill presentation Restart=always Restart=on-failure RestartSec=2 diff --git a/service-files/video.service b/service-files/video.service index 2071750..5f37617 100644 --- a/service-files/video.service +++ b/service-files/video.service @@ -9,7 +9,7 @@ Environment=DISPLAY=:0 WorkingDirectory=/opt/raspscreen ExecStartPre=/usr/bin/sleep 5 ExecStart=/opt/raspscreen/bin/manage.sh start video --foreground -ExecStop=/opt/raspscreen/bin/manage kill video +ExecStop=/opt/raspscreen/bin/manage.sh kill video Restart=always Restart=on-failure RestartSec=2