2024-02-07 03:05:58 +01:00
|
|
|
#!/usr/bin/with-contenv bash
|
2024-02-11 20:11:33 +01:00
|
|
|
### Default values
|
|
|
|
scriptVersion="1.1"
|
2024-02-07 03:05:58 +01:00
|
|
|
scriptName="ARLChecker"
|
2024-02-11 21:27:51 +01:00
|
|
|
sleepInterval='10s'
|
2024-02-08 04:59:59 +01:00
|
|
|
### Import Settings
|
|
|
|
source /config/extended.conf
|
|
|
|
|
2024-02-07 03:05:58 +01:00
|
|
|
echo 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
|
|
|
|
echo 'Found Interval in extended.conf'
|
2024-02-11 20:11:33 +01:00
|
|
|
sleepInterval="$arlUpdateInterval"
|
|
|
|
else
|
2024-02-11 21:27:51 +01:00
|
|
|
echo 'Interval Fallback'
|
2024-02-11 20:11:33 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo ARL Token Check Complete. Sleeping for ${sleepInterval}.
|
|
|
|
sleep ${sleepInterval}
|