Merge pull request #5828 from nextcloud/enh/5800/check-appstoreurl

nextcloud: check for configured appstoreurl during upgrade
This commit is contained in:
Simon L. 2025-01-06 12:00:03 +01:00 committed by GitHub
commit 9200fa51bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -158,7 +158,13 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
# Check connection to appstore start # Do not remove or change this line! # Check connection to appstore start # Do not remove or change this line!
while true; do while true; do
echo -e "Checking connection to appstore" echo -e "Checking connection to appstore"
CURL_STATUS="$(curl -LI "https://apps.nextcloud.com/" -o /dev/null -w '%{http_code}\n' -s)" APPSTORE_URL="https://apps.nextcloud.com/"
if grep -q appstoreurl /var/www/html/config/config.php; then
set -x
APPSTORE_URL="$(grep appstoreurl /var/www/html/config/config.php | grep -oP 'https://.*v[0-9]+')"
set +x
fi
CURL_STATUS="$(curl -LI "$APPSTORE_URL" -o /dev/null -w '%{http_code}\n' -s)"
if [[ "$CURL_STATUS" = "200" ]] if [[ "$CURL_STATUS" = "200" ]]
then then
echo "Appstore is reachable" echo "Appstore is reachable"