define updaterdirectory and add forgotten exit

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-04-02 11:26:42 +02:00
parent 187bf3f767
commit ed36ba6c8d
2 changed files with 8 additions and 0 deletions

View file

@ -264,6 +264,11 @@ RUN set -ex; \
VOLUME /mnt/ncdata
RUN set -ex; \
mkdir -p /nc-updater; \
chown -R www-data:www-data /nc-updater; \
chmod -R 770 /nc-updater
# Give root a random password
RUN echo "root:$(openssl rand -base64 12)" | chpasswd

View file

@ -252,11 +252,13 @@ DATADIR_PERMISSION_CONF
if [ "$INSTALL_LATEST_MAJOR" = yes ]; then
php /var/www/html/occ config:system:set updater.release.channel --value=beta
php /var/www/html/occ config:system:set updatedirectory --value="/nc-updater"
php /var/www/html/updater/updater.phar --no-interaction
php /var/www/html/occ app:enable nextcloud-aio --force
if ! php /var/www/html/occ -V || php /var/www/html/occ status | grep maintenance | grep -q 'true'; then
echo "Installation of Nextcloud failed!"
touch "$NEXTCLOUD_DATA_DIR/install.failed"
exit 1
fi
php /var/www/html/occ config:system:set updater.release.channel --value=stable
php /var/www/html/occ db:add-missing-indices
@ -427,6 +429,7 @@ php /var/www/html/occ app:enable support
echo "Adjusting log files..."
php /var/www/html/occ config:system:set logfile --value="/var/www/html/data/nextcloud.log"
php /var/www/html/occ config:app:set admin_audit logfile --value="/var/www/html/data/audit.log"
php /var/www/html/occ config:system:set updatedirectory --value="/nc-updater"
# Apply network settings
echo "Applying network settings..."