mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-07-03 07:35:41 +00:00
nextcloud: also update daily
This commit is contained in:
@ -1,17 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! -f /config/config.php ]; then
|
||||
echo -e "<?php\n\$CONFIG = array (\n 'datadirectory' => '/data',\n);" > /config/config.php
|
||||
fi
|
||||
|
||||
sed -i -e "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /etc/nginx/nginx.conf /etc/php7/php-fpm.conf \
|
||||
-e "s/<APC_SHM_SIZE>/$APC_SHM_SIZE/g" /etc/php7/conf.d/apcu.ini \
|
||||
-e "s/<OPCACHE_MEM_SIZE>/$OPCACHE_MEM_SIZE/g" /etc/php7/conf.d/00_opcache.ini \
|
||||
-e "s/<CRON_PERIOD>/$CRON_PERIOD/g" /etc/s6.d/cron/run
|
||||
|
||||
# Put the configuration and apps into volumes
|
||||
ln -sf /config/config.php /nextcloud/config/config.php &>/dev/null
|
||||
ln -sf /apps2 /nextcloud &>/dev/null
|
||||
|
||||
chown -R $UID:$GID /nextcloud /data /config /apps2 /etc/nginx /etc/php7 /var/log /var/lib/nginx /tmp /etc/s6.d
|
||||
|
||||
ln -s /config/config.php /nextcloud/config/config.php &>/dev/null
|
||||
ln -s /apps2 /nextcloud &>/dev/null
|
||||
if [ ! -f /config/config.php ]; then
|
||||
# New installation, run the setup
|
||||
/usr/local/bin/setup.sh
|
||||
else
|
||||
occ upgrade
|
||||
if [ \( $? -ne 0 \) -a \( $? -ne 3 \) ]; then
|
||||
echo "Trying ownCloud upgrade again to work around ownCloud upgrade bug..."
|
||||
occ upgrade
|
||||
if [ \( $? -ne 0 \) -a \( $? -ne 3 \) ]; then exit 1; fi
|
||||
occ maintenance:mode --off
|
||||
echo "...which seemed to work."
|
||||
fi
|
||||
fi
|
||||
|
||||
chown -R $UID:$GID /nextcloud /data /config /apps2 /etc/nginx /etc/php7 /var/log /var/lib/nginx /tmp /etc/s6.d
|
||||
|
||||
exec su-exec $UID:$GID /bin/s6-svscan /etc/s6.d
|
||||
|
Reference in New Issue
Block a user