v1.0.032 - Improve lidarr api test

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

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
scriptVersion="1.0.031" scriptVersion="1.0.032"
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)"
@ -30,8 +30,8 @@ log () {
verifyApiAccess () { verifyApiAccess () {
until false until false
do do
lidarrTest=$(wget --timeout=0 -q -O - "$lidarrUrl/api/v1/system/status?apikey=${lidarrApiKey}" | jq -r .branch) lidarrTest=$(wget --timeout=0 -q -O - "$lidarrUrl/api/v1/system/status?apikey=${lidarrApiKey}" | jq -r .appName)
if [ $lidarrTest = master ]; then if [ "$lidarrTest" == "Lidarr" ]; then
lidarrVersion=$(wget --timeout=0 -q -O - "$lidarrUrl/api/v1/system/status?apikey=${lidarrApiKey}" | jq -r .version) 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

Loading…
Cancel
Save