Update scarrs/Upgrade-Sonarr.sh
This commit is contained in:
parent
f8941a72d1
commit
f7aa4bb410
1 changed files with 6 additions and 7 deletions
|
|
@ -6,8 +6,8 @@ system=sonarr
|
|||
CreateContainer () {
|
||||
local ver=$1
|
||||
local serv=$2
|
||||
local container = docker.io/linuxserver/$serv:latest # :latest used to autimatically override older version in local DOCKERFILE, this way we don't need to delete locally pulled containers
|
||||
local name = $serv-$ver
|
||||
local container="docker.io/linuxserver/$serv:latest" # :latest used to autimatically override older version in local DOCKERFILE, this way we don't need to delete locally pulled containers
|
||||
local name="$serv-$ver"
|
||||
local pod="$(echo $serv | sed -e 's/\b\(.\)/\u\1/g')"
|
||||
local env="/opt/arr/any.env"
|
||||
if $debug; then
|
||||
|
|
@ -33,9 +33,8 @@ CreateContainer () {
|
|||
|
||||
GetNewVer () {
|
||||
serv="$1"
|
||||
jqcom=".data.repositories.linuxserver[] | select(.name==$serv)"
|
||||
json=$(curl https://api.linuxserver.io/api/v1/images | jq $jqcom)
|
||||
ver= (echo $json | jq .version | awk -F'"' '{print $2}' | awk -F\. '{print $1 "." $2 "." $3}')
|
||||
json="$(curl https://api.linuxserver.io/api/v1/images | jq .data.repositories.linuxserver[] | select(.name==$serv))"
|
||||
ver=$(echo $json | jq .version | awk -F\" '{print $2}' | awk -F\. '{print $1 "." $2 "." $3}')
|
||||
echo $ver
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue