mirror of
https://github.com/Unimatrix0/update_ombi.git
synced 2025-08-14 10:37:40 -07:00
feat(updater): add support for base_url
This commit is contained in:
parent
f1daf45502
commit
672951ac8d
1 changed files with 6 additions and 1 deletions
|
@ -40,6 +40,7 @@ defaultuser="ombi"
|
|||
defaultgroup="nogroup"
|
||||
defaultip="127.0.0.1"
|
||||
defaultport="5000"
|
||||
baseurl="" # Put your baseurl here if you're using one
|
||||
|
||||
## Level of verbosity ##
|
||||
## By default, none ##
|
||||
|
@ -196,7 +197,11 @@ declare -i j=5
|
|||
while [ $i -le $j ]
|
||||
do
|
||||
.log 6 "Checking for latest version"
|
||||
json=$(curl -sL http://$ip:$port/api/v1/Update/develop)
|
||||
if [ -z "$baseurl" ]; then
|
||||
json=$(curl -sL http://$ip:$port/$baseurl/api/v1/Update)
|
||||
else
|
||||
json=$(curl -sL http://$ip:$port/api/v1/Update)
|
||||
fi
|
||||
.log 8 "json: $json"
|
||||
latestversion=$(grep -Po '(?<="updateVersionString":")([^"]+)' <<< "$json")
|
||||
.log 7 "latestversion: $latestversion"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue