|
|
@ -1,5 +1,5 @@
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
scriptVersion="1.0.235"
|
|
|
|
scriptVersion="1.0.236"
|
|
|
|
if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then
|
|
|
|
if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then
|
|
|
|
lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
|
|
|
|
lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
|
|
|
|
if [ "$lidarrUrlBase" = "null" ]; then
|
|
|
|
if [ "$lidarrUrlBase" = "null" ]; then
|
|
|
@ -38,9 +38,9 @@ log () {
|
|
|
|
verifyApiAccess () {
|
|
|
|
verifyApiAccess () {
|
|
|
|
until false
|
|
|
|
until false
|
|
|
|
do
|
|
|
|
do
|
|
|
|
lidarrVersion=""
|
|
|
|
lidarrTest=$(wget --timeout=0 -q -O - "$lidarrUrl/api/v1/system/status?apikey=${lidarrApiKey}" | jq -r .appName)
|
|
|
|
lidarrVersion=$(wget --timeout=0 -q -O - "$lidarrUrl/api/v1/system/status?apikey=${lidarrApiKey}" | jq -r .version)
|
|
|
|
if [ "$lidarrTest" == "Lidarr" ]; then
|
|
|
|
if [ ! -z "$lidarrVersion" ]; then
|
|
|
|
lidarrVersion=$(wget --timeout=0 -q -O - "$lidarrUrl/api/v1/system/status?apikey=${lidarrApiKey}" | jq -r .version)
|
|
|
|
log "Lidarr Version: $lidarrVersion"
|
|
|
|
log "Lidarr Version: $lidarrVersion"
|
|
|
|
break
|
|
|
|
break
|
|
|
|
else
|
|
|
|
else
|
|
|
|