From 011019b6585c29060c5d9c3b0dd282bcff8ebceb Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Fri, 4 Nov 2022 13:22:22 -0400 Subject: [PATCH] Bugfix to run properly via loop --- root/etc/services.d/extended_video/run | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/root/etc/services.d/extended_video/run b/root/etc/services.d/extended_video/run index 2d6f639..a927944 100644 --- a/root/etc/services.d/extended_video/run +++ b/root/etc/services.d/extended_video/run @@ -1,13 +1,18 @@ #!/usr/bin/with-contenv bash -if [ "$enableVideoScript" = "true" ]; then - echo "Starting Video.sh in 2 min..." - sleep 2m - bash /config/extended/scripts/Video.sh -else +if [ "$enableVideoScript" != "true" ]; then echo "Automatic Start Disabled, to enable set enableVideoScript=true" echo "Manually run using this command:" echo "bash /config/extended/scripts/Video.sh" sleep infinity fi -exit $? +echo "Starting Video.sh in 2 min..." +sleep 2m +for (( ; ; )); do + let i++ + bash /config/extended/scripts/Video.sh + echo "Video.sh script sleeping for $scriptInterval..." + sleep $scriptInterval +done + +exit