#5249 -- Prevent infinite restart loop of installer.

This commit is contained in:
Buster "Silver Eagle" Neece 2022-03-31 17:12:56 -05:00
parent 84ebb96bae
commit 8f31412d45
No known key found for this signature in database
GPG Key ID: 9FC8B9E008872109
1 changed files with 19 additions and 5 deletions

View File

@ -217,16 +217,30 @@ setup-release() {
curl -fsSL https://raw.githubusercontent.com/AzuraCast/AzuraCast/main/sample.env -o .env
fi
local AZURACAST_VERSION="latest"
if ask "Prefer stable release versions of AzuraCast?" N; then
AZURACAST_VERSION="stable"
local OLD_RELEASE_CHANNEL
.env --file .env get AZURACAST_VERSION
OLD_RELEASE_CHANNEL="${REPLY:-latest}"
local AZURACAST_VERSION="${OLD_RELEASE_CHANNEL}"
if [[ $AZURACAST_VERSION == "latest" ]]; then
if ask "Your current release channel is 'Rolling Release'. Switch to 'Stable' release channel?" N; then
AZURACAST_VERSION="stable"
fi
elif [[ $AZURACAST_VERSION == "stable" ]]; then
if ask "Your current release channel is 'Stable'. Switch to 'Rolling Release' release channel?" N; then
AZURACAST_VERSION="latest"
fi
fi
set +e
.env --file .env set AZURACAST_VERSION=${AZURACAST_VERSION}
if ask "You should update the Docker Utility Script after changing release channels. Automatically update it now?" Y; then
update-self
if [[ $AZURACAST_VERSION != $OLD_RELEASE_CHANNEL ]]; then
if ask "You should update the Docker Utility Script after changing release channels. Automatically update it now?" Y; then
update-self
fi
fi
}