Skip to content

Commit

Permalink
Merge pull request #5828 from nextcloud/enh/5800/check-appstoreurl
Browse files Browse the repository at this point in the history
nextcloud: check for configured appstoreurl during upgrade
  • Loading branch information
szaimen authored Jan 6, 2025
2 parents f5cc4b0 + 986130b commit 9200fa5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Containers/nextcloud/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,13 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
# Check connection to appstore start # Do not remove or change this line!
while true; do
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" ]]
then
echo "Appstore is reachable"
Expand Down

0 comments on commit 9200fa5

Please sign in to comment.