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