Update DailySeriesEpisodeTrimmer.bash
This commit is contained in:
parent
ce0e3579d3
commit
026cbb3da5
1 changed files with 17 additions and 5 deletions
|
@ -1,5 +1,21 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
scriptVersion="1.0"
|
scriptVersion="1.1"
|
||||||
|
scriptName="DailySeriesEpisodeTrimmer"
|
||||||
|
|
||||||
|
#### Import Settings
|
||||||
|
source /config/extended.conf
|
||||||
|
|
||||||
|
log () {
|
||||||
|
m_time=`date "+%F %T"`
|
||||||
|
echo $m_time" :: $scriptName :: $scriptVersion :: "$1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$enableDailySeriesEpisodeTrimmer" != "true" ]; then
|
||||||
|
log "Script is not enabled, enable by setting enableDailySeriesEpisodeTrimmer to \"true\" by modifying the \"/config/extended.conf\" config file..."
|
||||||
|
log "Sleeping (infinity)"
|
||||||
|
sleep infinity
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then
|
if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then
|
||||||
arrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
|
arrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
|
||||||
|
@ -13,10 +29,6 @@ if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then
|
||||||
arrUrl="http://127.0.0.1:${arrPort}${arrUrlBase}"
|
arrUrl="http://127.0.0.1:${arrPort}${arrUrlBase}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log () {
|
|
||||||
m_time=`date "+%F %T"`
|
|
||||||
echo $m_time" :: DailySeriesEpisodeTrimmer :: $scriptVersion :: "$1
|
|
||||||
}
|
|
||||||
|
|
||||||
# auto-clean up log file to reduce space usage
|
# auto-clean up log file to reduce space usage
|
||||||
if [ -f "/config/logs/DailySeriesEpisodeTrimmer.txt" ]; then
|
if [ -f "/config/logs/DailySeriesEpisodeTrimmer.txt" ]; then
|
||||||
|
|
Loading…
Reference in a new issue