v1.2 make configurable
This commit is contained in:
parent
cc94e84838
commit
d4d49f83cc
1 changed files with 17 additions and 9 deletions
|
@ -1,6 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
scriptVersion="1.1"
|
||||
scriptVersion="1.2"
|
||||
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 () {
|
||||
# Get Arr App information
|
||||
|
@ -38,12 +52,6 @@ verifyApiAccess () {
|
|||
done
|
||||
}
|
||||
|
||||
|
||||
log () {
|
||||
m_time=`date "+%F %T"`
|
||||
echo $m_time" :: AutoExtras :: $scriptVersion :: "$1
|
||||
}
|
||||
|
||||
AutoExtrasProcess () {
|
||||
# auto-clean up log file to reduce space usage
|
||||
if [ -f "/config/logs/AutoExtras.txt" ]; then
|
||||
|
@ -79,8 +87,8 @@ AutoExtrasProcess () {
|
|||
echo "Starting Script...."
|
||||
for (( ; ; )); do
|
||||
let i++
|
||||
getArrAppInfo
|
||||
verifyApiAccess
|
||||
getArrAppInfo
|
||||
verifyApiAccess
|
||||
AutoExtrasProcess
|
||||
echo "Script sleeping for 24 hours..."
|
||||
sleep 24h
|
||||
|
|
Loading…
Reference in a new issue