2024-02-07 03:05:58 +01:00
|
|
|
#!/usr/bin/with-contenv bash
|
2024-02-11 20:11:33 +01:00
|
|
|
### Default values
|
2024-02-13 03:17:54 +01:00
|
|
|
scriptVersion="1.4.0"
|
2024-02-07 03:05:58 +01:00
|
|
|
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
|
2024-02-11 20:11:33 +01:00
|
|
|
|
|
|
|
# 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"
|
2024-02-11 20:11:33 +01:00
|
|
|
sleepInterval="$arlUpdateInterval"
|
|
|
|
else
|
2024-02-12 14:13:04 +01:00
|
|
|
log "Interval Fallback"
|
2024-02-11 20:11:33 +01:00
|
|
|
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}
|