From 6bd5d698a74efb21815f3de19d5ff695248d1455 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Sat, 18 Mar 2023 11:19:28 -0400 Subject: [PATCH] Update QueueCleaner.bash --- QueueCleaner.bash | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/QueueCleaner.bash b/QueueCleaner.bash index f81f601..bab43af 100644 --- a/QueueCleaner.bash +++ b/QueueCleaner.bash @@ -1,6 +1,9 @@ #!/usr/bin/env bash scriptVersion="1.0.0" +######## Settings +scriptInterval="15m" + ######## Package dependencies installation pip install --upgrade --no-cache-dir -U yq &>/dev/null @@ -76,16 +79,21 @@ QueueCleanerProcess () { fi } +if [ "$arrName" == "enableQueueCleaner" ]; then + log "ERROR :: Script disabled, exiting..." + exit +fi + arrName="$(cat /config/config.xml | xq | jq -r .Config.InstanceName)" if [ "$arrName" == "Sonarr" ] || [ "$arrName" == "Radarr" ] || [ "$arrName" == "Lidarr" ]; then log "Waiting for $arrName to startup, sleeping for 2 minutes..." - #sleep 2m + sleep 2m log "Starting Script...." for (( ; ; )); do let i++ QueueCleanerProcess - log "Processing complete, sleeping for 15 minutes..." - sleep 15m + log "Processing complete, sleeping for $scriptInterval..." + sleep $scriptInterval done else log "ERROR :: Arr app not detected, exiting..."