lidarr-dl/lidarr/ARLChecker

33 lines
931 B
Text
Raw Normal View History

#!/usr/bin/with-contenv bash
### Default values
scriptVersion="1.6 dev"
scriptName="ARLChecker"
2024-02-11 21:28:15 +01:00
sleepInterval='24h'
2024-02-08 04:59:59 +01:00
### Import Settings
source /config/extended.conf
2024-02-12 14:07:19 +01:00
#### 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
2024-02-08 04:59:59 +01:00
2024-02-12 14:13:04 +01:00
log "Starting ARL Token Check..."
2024-02-11 21:27:51 +01:00
# 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
2024-02-11 21:27:51 +01:00
if [[ -v arlUpdateInterval ]] && [ "$arlUpdateInterval" != "" ]
then
2024-02-12 14:13:04 +01:00
log "Found Interval in extended.conf"
sleepInterval="$arlUpdateInterval"
else
2024-02-12 14:13:04 +01:00
log "Interval Fallback"
fi
2024-02-12 14:13:04 +01:00
log "ARL Token Check Complete. Sleeping for ${sleepInterval}."
2024-02-12 14:07:19 +01:00
sleep ${sleepInterval}