Update AutoExtras.bash

pull/24/head
RandomNinjaAtk 2 years ago committed by GitHub
parent 2ed325f6cb
commit cac9b0e907
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,5 @@
#!/usr/bin/env bash
scriptVersion="1.0.000"
scriptVersion="1.0.001"
if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then
arrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
@ -15,7 +15,7 @@ fi
log () {
m_time=`date "+%F %T"`
echo $m_time" :: AutoExtras :: "$1
echo $m_time" :: AutoExtras :: $scriptVersion :: "$1
}
# auto-clean up log file to reduce space usage
@ -23,8 +23,9 @@ if [ -f "/config/logs/AutoExtras.txt" ]; then
find /config/logs -type f -name "AutoExtras.txt" -size +1024k -delete
fi
exec &>> "/config/logs/AutoExtras.txt"
touch "/config/logs/AutoExtras.txt"
chmod 666 "/config/logs/AutoExtras.txt"
exec &> >(tee -a "/config/logs/AutoExtras.txt")
sonarrSeriesList=$(curl -s --header "X-Api-Key:"${arrApiKey} --request GET "$arrUrl/api/v3/series")
sonarrSeriesTotal=$(echo "${sonarrSeriesList}" | jq -r '.[].id' | wc -l)

Loading…
Cancel
Save