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