v1.0.8 - loging process fix
Change order of operations
This commit is contained in:
parent
3eb64d675c
commit
5dc4b41537
1 changed files with 10 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
scriptVersion="1.0.7"
|
scriptVersion="1.0.8"
|
||||||
|
|
||||||
######## Settings
|
######## Settings
|
||||||
scriptInterval="15m"
|
scriptInterval="15m"
|
||||||
|
@ -14,6 +14,15 @@ log () {
|
||||||
echo $m_time" :: QueueCleaner :: $scriptVersion :: "$1
|
echo $m_time" :: QueueCleaner :: $scriptVersion :: "$1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# auto-clean up log file to reduce space usage
|
||||||
|
if [ -f "/config/logs/QueueCleaner.txt" ]; then
|
||||||
|
find /config/logs -type f -name "QueueCleaner.txt" -size +1024k -delete
|
||||||
|
fi
|
||||||
|
|
||||||
|
touch "/config/logs/QueueCleaner.txt"
|
||||||
|
chmod 666 "/config/logs/QueueCleaner.txt"
|
||||||
|
exec &> >(tee -a "/config/logs/QueueCleaner.txt")
|
||||||
|
|
||||||
QueueCleanerProcess () {
|
QueueCleanerProcess () {
|
||||||
# Get Arr App information
|
# Get Arr App information
|
||||||
if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then
|
if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then
|
||||||
|
@ -29,15 +38,6 @@ QueueCleanerProcess () {
|
||||||
arrUrl="http://127.0.0.1:${arrPort}${arrUrlBase}"
|
arrUrl="http://127.0.0.1:${arrPort}${arrUrlBase}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# auto-clean up log file to reduce space usage
|
|
||||||
if [ -f "/config/logs/QueueCleaner.txt" ]; then
|
|
||||||
find /config/logs -type f -name "QueueCleaner.txt" -size +1024k -delete
|
|
||||||
fi
|
|
||||||
|
|
||||||
touch "/config/logs/QueueCleaner.txt"
|
|
||||||
chmod 666 "/config/logs/QueueCleaner.txt"
|
|
||||||
exec &> >(tee -a "/config/logs/QueueCleaner.txt")
|
|
||||||
|
|
||||||
verifyApiAccess
|
verifyApiAccess
|
||||||
|
|
||||||
if [ "$arrName" == "Sonarr" ]; then
|
if [ "$arrName" == "Sonarr" ]; then
|
||||||
|
|
Loading…
Reference in a new issue