collection.dockerfile/alpine/fpmredis/nc-upgrade.sh

18 lines
554 B
Bash

#!/bin/bash
cp /etc/php81/php.ini /etc/php81/php.ini-orig
sed -i -e '/^disable_function/d' /etc/php81/php.ini
VERSION=$1
cd /var/www/nextcloud
cp nextcloud/config/config.php .
cp -ap nextcloud/data/ data/
apk add axel sudo
axel https://download.nextcloud.com/server/releases/nextcloud-$VERSION.zip
unzip -o -q nextcloud-$VERSION.zip
cp config.php nextcloud/config/
cp -ap data nextcloud/
chown -R xfs:xfs nextcloud
cd nextcloud
sudo -u xfs php81 occ upgrade
sudo -u xfs php81 occ maintenance:mode --off
cp /etc/php81/php.ini-orig /etc/php81/php.ini