mirror of
https://github.com/nextcloud/docker.git
synced 2024-11-18 02:56:42 +01:00
Merge pull request #119 from tilosp-docker/fix-upgrading
Ensure apps.config.php get only copied when upgrading from old version
This commit is contained in:
commit
034ea8be5a
7 changed files with 42 additions and 14 deletions
|
@ -29,16 +29,20 @@ if version_greater "$image_version" "$installed_version"; then
|
||||||
fi
|
fi
|
||||||
rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
|
rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
|
||||||
|
|
||||||
for dir in config data custom_apps themes; do
|
for dir in config data themes; do
|
||||||
if [ ! -d /var/www/html/"$dir" ] || directory_empty /var/www/html/"$dir"; then
|
if [ ! -d /var/www/html/"$dir" ] || directory_empty /var/www/html/"$dir"; then
|
||||||
cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
|
cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -f /var/www/html/config/apps.config.php ]; then
|
if [ ! -d /var/www/html/custom_apps ] && [ ! -f /var/www/html/config/apps.config.php ]; then
|
||||||
cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
|
cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -d /var/www/html/custom_apps ] || directory_empty /var/www/html/custom_apps; then
|
||||||
|
cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$installed_version" != "0.0.0~unknown" ]; then
|
if [ "$installed_version" != "0.0.0~unknown" ]; then
|
||||||
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
|
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
|
||||||
|
|
||||||
|
|
|
@ -29,16 +29,20 @@ if version_greater "$image_version" "$installed_version"; then
|
||||||
fi
|
fi
|
||||||
rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
|
rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
|
||||||
|
|
||||||
for dir in config data custom_apps themes; do
|
for dir in config data themes; do
|
||||||
if [ ! -d /var/www/html/"$dir" ] || directory_empty /var/www/html/"$dir"; then
|
if [ ! -d /var/www/html/"$dir" ] || directory_empty /var/www/html/"$dir"; then
|
||||||
cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
|
cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -f /var/www/html/config/apps.config.php ]; then
|
if [ ! -d /var/www/html/custom_apps ] && [ ! -f /var/www/html/config/apps.config.php ]; then
|
||||||
cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
|
cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -d /var/www/html/custom_apps ] || directory_empty /var/www/html/custom_apps; then
|
||||||
|
cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$installed_version" != "0.0.0~unknown" ]; then
|
if [ "$installed_version" != "0.0.0~unknown" ]; then
|
||||||
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
|
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
|
||||||
|
|
||||||
|
|
|
@ -29,16 +29,20 @@ if version_greater "$image_version" "$installed_version"; then
|
||||||
fi
|
fi
|
||||||
rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
|
rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
|
||||||
|
|
||||||
for dir in config data custom_apps themes; do
|
for dir in config data themes; do
|
||||||
if [ ! -d /var/www/html/"$dir" ] || directory_empty /var/www/html/"$dir"; then
|
if [ ! -d /var/www/html/"$dir" ] || directory_empty /var/www/html/"$dir"; then
|
||||||
cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
|
cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -f /var/www/html/config/apps.config.php ]; then
|
if [ ! -d /var/www/html/custom_apps ] && [ ! -f /var/www/html/config/apps.config.php ]; then
|
||||||
cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
|
cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -d /var/www/html/custom_apps ] || directory_empty /var/www/html/custom_apps; then
|
||||||
|
cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$installed_version" != "0.0.0~unknown" ]; then
|
if [ "$installed_version" != "0.0.0~unknown" ]; then
|
||||||
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
|
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
|
||||||
|
|
||||||
|
|
|
@ -29,16 +29,20 @@ if version_greater "$image_version" "$installed_version"; then
|
||||||
fi
|
fi
|
||||||
rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
|
rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
|
||||||
|
|
||||||
for dir in config data custom_apps themes; do
|
for dir in config data themes; do
|
||||||
if [ ! -d /var/www/html/"$dir" ] || directory_empty /var/www/html/"$dir"; then
|
if [ ! -d /var/www/html/"$dir" ] || directory_empty /var/www/html/"$dir"; then
|
||||||
cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
|
cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -f /var/www/html/config/apps.config.php ]; then
|
if [ ! -d /var/www/html/custom_apps ] && [ ! -f /var/www/html/config/apps.config.php ]; then
|
||||||
cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
|
cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -d /var/www/html/custom_apps ] || directory_empty /var/www/html/custom_apps; then
|
||||||
|
cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$installed_version" != "0.0.0~unknown" ]; then
|
if [ "$installed_version" != "0.0.0~unknown" ]; then
|
||||||
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
|
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
|
||||||
|
|
||||||
|
|
|
@ -29,16 +29,20 @@ if version_greater "$image_version" "$installed_version"; then
|
||||||
fi
|
fi
|
||||||
rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
|
rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
|
||||||
|
|
||||||
for dir in config data custom_apps themes; do
|
for dir in config data themes; do
|
||||||
if [ ! -d /var/www/html/"$dir" ] || directory_empty /var/www/html/"$dir"; then
|
if [ ! -d /var/www/html/"$dir" ] || directory_empty /var/www/html/"$dir"; then
|
||||||
cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
|
cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -f /var/www/html/config/apps.config.php ]; then
|
if [ ! -d /var/www/html/custom_apps ] && [ ! -f /var/www/html/config/apps.config.php ]; then
|
||||||
cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
|
cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -d /var/www/html/custom_apps ] || directory_empty /var/www/html/custom_apps; then
|
||||||
|
cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$installed_version" != "0.0.0~unknown" ]; then
|
if [ "$installed_version" != "0.0.0~unknown" ]; then
|
||||||
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
|
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
|
||||||
|
|
||||||
|
|
|
@ -29,16 +29,20 @@ if version_greater "$image_version" "$installed_version"; then
|
||||||
fi
|
fi
|
||||||
rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
|
rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
|
||||||
|
|
||||||
for dir in config data custom_apps themes; do
|
for dir in config data themes; do
|
||||||
if [ ! -d /var/www/html/"$dir" ] || directory_empty /var/www/html/"$dir"; then
|
if [ ! -d /var/www/html/"$dir" ] || directory_empty /var/www/html/"$dir"; then
|
||||||
cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
|
cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -f /var/www/html/config/apps.config.php ]; then
|
if [ ! -d /var/www/html/custom_apps ] && [ ! -f /var/www/html/config/apps.config.php ]; then
|
||||||
cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
|
cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -d /var/www/html/custom_apps ] || directory_empty /var/www/html/custom_apps; then
|
||||||
|
cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$installed_version" != "0.0.0~unknown" ]; then
|
if [ "$installed_version" != "0.0.0~unknown" ]; then
|
||||||
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
|
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
|
||||||
|
|
||||||
|
|
|
@ -29,16 +29,20 @@ if version_greater "$image_version" "$installed_version"; then
|
||||||
fi
|
fi
|
||||||
rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
|
rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
|
||||||
|
|
||||||
for dir in config data custom_apps themes; do
|
for dir in config data themes; do
|
||||||
if [ ! -d /var/www/html/"$dir" ] || directory_empty /var/www/html/"$dir"; then
|
if [ ! -d /var/www/html/"$dir" ] || directory_empty /var/www/html/"$dir"; then
|
||||||
cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
|
cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -f /var/www/html/config/apps.config.php ]; then
|
if [ ! -d /var/www/html/custom_apps ] && [ ! -f /var/www/html/config/apps.config.php ]; then
|
||||||
cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
|
cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -d /var/www/html/custom_apps ] || directory_empty /var/www/html/custom_apps; then
|
||||||
|
cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$installed_version" != "0.0.0~unknown" ]; then
|
if [ "$installed_version" != "0.0.0~unknown" ]; then
|
||||||
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
|
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue