v1.1 make configurable
This commit is contained in:
parent
175991d34f
commit
f8a6361828
1 changed files with 18 additions and 8 deletions
|
@ -1,5 +1,20 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
scriptVersion="1.0"
|
scriptVersion="1.1"
|
||||||
|
scriptName="AutoExtras"
|
||||||
|
|
||||||
|
#### Import Settings
|
||||||
|
source /config/extended.conf
|
||||||
|
|
||||||
|
log () {
|
||||||
|
m_time=`date "+%F %T"`
|
||||||
|
echo $m_time" :: $scriptName :: $scriptVersion :: "$1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$enableExtras" != "true" ]; then
|
||||||
|
log "Script is not enabled, enable by setting enableExtras to \"true\" by modifying the \"/config/extended.conf\" config file..."
|
||||||
|
log "Sleeping (infinity)"
|
||||||
|
sleep infinity
|
||||||
|
fi
|
||||||
|
|
||||||
getArrAppInfo () {
|
getArrAppInfo () {
|
||||||
# Get Arr App information
|
# Get Arr App information
|
||||||
|
@ -37,11 +52,6 @@ verifyApiAccess () {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
log () {
|
|
||||||
m_time=`date "+%F %T"`
|
|
||||||
echo $m_time" :: AutoExtras :: $scriptVersion :: "$1
|
|
||||||
}
|
|
||||||
|
|
||||||
AutoExtrasProcess () {
|
AutoExtrasProcess () {
|
||||||
|
|
||||||
# auto-clean up log file to reduce space usage
|
# auto-clean up log file to reduce space usage
|
||||||
|
@ -68,13 +78,13 @@ AutoExtrasProcess () {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "Starting Script...."
|
log "Starting Script...."
|
||||||
for (( ; ; )); do
|
for (( ; ; )); do
|
||||||
let i++
|
let i++
|
||||||
getArrAppInfo
|
getArrAppInfo
|
||||||
verifyApiAccess
|
verifyApiAccess
|
||||||
AutoExtrasProcess
|
AutoExtrasProcess
|
||||||
echo "Script sleeping for 24 hours..."
|
log "Script sleeping for 24 hours..."
|
||||||
sleep 24h
|
sleep 24h
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue