From ce0e3579d3bed2122f727f7924ca9c544b8a11f8 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Wed, 12 Jul 2023 11:20:31 +0000 Subject: [PATCH] Update InvalidSeriesAutoCleaner.service --- sonarr/InvalidSeriesAutoCleaner.service | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/sonarr/InvalidSeriesAutoCleaner.service b/sonarr/InvalidSeriesAutoCleaner.service index a17e923..a7205dc 100644 --- a/sonarr/InvalidSeriesAutoCleaner.service +++ b/sonarr/InvalidSeriesAutoCleaner.service @@ -1,5 +1,20 @@ #!/usr/bin/env bash -scriptVersion="1.1" +scriptVersion="1.2" +scriptName="InvalidSeriesAutoCleaner" + +#### Import Settings +source /config/extended.conf + +log () { + m_time=`date "+%F %T"` + echo $m_time" :: $scriptName :: $scriptVersion :: "$1 +} + +if [ "$enableInvalidSeriesAutoCleaner" != "true" ]; then + log "Script is not enabled, enable by setting enableInvalidSeriesAutoCleaner to \"true\" by modifying the \"/config/extended.conf\" config file..." + log "Sleeping (infinity)" + sleep infinity +fi getArrAppInfo () { # Get Arr App information @@ -37,12 +52,6 @@ verifyApiAccess () { done } - -log () { - m_time=`date "+%F %T"` - echo $m_time" :: InvalidSeriesAutoCleaner :: $scriptVersion :: "$1 -} - InvalidSeriesAutoCleanerProcess () { # auto-clean up log file to reduce space usage if [ -f "/config/logs/SeriesAutoDelete.txt" ]; then