Merge pull request #191 from hockeygoalie35/main

Fix Issue #189
This commit is contained in:
RandomNinjaAtk 2024-02-11 15:37:18 -05:00 committed by GitHub
commit 653ecca5eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,11 +1,24 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
scriptVersion="0.1" ### Default values
scriptVersion="1.1"
scriptName="ARLChecker" scriptName="ARLChecker"
sleepInterval='24h'
### Import Settings ### Import Settings
source /config/extended.conf source /config/extended.conf
echo Starting ARL Token Check... echo Starting ARL Token Check...
# run py script
python /custom-services.d/python/ARLChecker.py -c python /custom-services.d/python/ARLChecker.py -c
echo ARL Token Check Complete. Sleeping for 24hrs...
sleep "$arlUpdateInterval" # 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}