Add permission failsafe to updater too.

This commit is contained in:
Buster "Silver Eagle" Neece 2021-07-11 03:16:16 -05:00
parent a39fb4ecbf
commit 26ed1df873
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
1 changed files with 11 additions and 7 deletions

View File

@ -215,6 +215,10 @@ setup-letsencrypt() {
# Configure release mode settings.
#
setup-release() {
if [[ ! -f .env ]]; then
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"
@ -393,15 +397,15 @@ update() {
# Check for updated Docker Compose config.
local COMPOSE_FILES_MATCH
if [[ -s docker-compose.new.yml ]]; then
COMPOSE_FILES_MATCH="$(
cmp --silent docker-compose.yml docker-compose.new.yml
echo $?
)"
else
COMPOSE_FILES_MATCH=0
if [[ ! -s docker-compose.new.yml ]]; then
curl -fsSL https://raw.githubusercontent.com/AzuraCast/AzuraCast/$AZURACAST_RELEASE_BRANCH/docker-compose.sample.yml -o docker-compose.new.yml
fi
COMPOSE_FILES_MATCH="$(
cmp --silent docker-compose.yml docker-compose.new.yml
echo $?
)"
if [[ ${COMPOSE_FILES_MATCH} -ne 0 ]]; then
docker-compose -f docker-compose.new.yml pull
docker-compose down