lidarr-dl/lidarr/ARLChecker
2024-02-12 13:07:19 +00:00

32 lines
927 B
Text

#!/usr/bin/with-contenv bash
### Default values
scriptVersion="1.2"
scriptName="ARLChecker"
sleepInterval='24h'
### Import Settings
source /config/extended.conf
#### Import Functions
source /config/extended/functions
if [ "$dlClientSource" == "tidal" ]; then
log "Script is not enabled, enable by setting dlClientSource to \"deezer\" or \"both\" by modifying the \"/config/extended.conf\" config file..."
log "Sleeping (infinity)"
sleep infinity
fi
echo Starting ARL Token Check...
# run py script
python /custom-services.d/python/ARLChecker.py -c
# If variable doesn't exist, or not set by user in extended.conf, fallback to 24h
# See issue #189
if [[ -v arlUpdateInterval ]] && [ "$arlUpdateInterval" != "" ]
then
echo 'Found Interval in extended.conf'
sleepInterval="$arlUpdateInterval"
else
echo 'Interval Fallback'
fi
echo ARL Token Check Complete. Sleeping for ${sleepInterval}.
sleep ${sleepInterval}