mirror of
https://github.com/linuxserver/docker-nextcloud.git
synced 2026-02-19 23:03:50 +08:00
Fix order of operations
This commit is contained in:
parent
d1c323e579
commit
ee61df9ca5
@ -36,13 +36,6 @@ for dir in apps config themes; do
|
||||
fi
|
||||
done
|
||||
|
||||
# set data directory
|
||||
if [ -f /config/www/nextcloud/config/config.php ]; then
|
||||
sed -i "s|/app/www/public/data|/data|g" /config/www/nextcloud/config/config.php
|
||||
else
|
||||
echo -e "<?php\n\$CONFIG = ['datadirectory' => '/data'];" >/config/www/nextcloud/config/config.php
|
||||
fi
|
||||
|
||||
# get versions
|
||||
image_version=$(php -r "require '/app/www/src/version.php'; echo implode('.', \$OC_Version);" 2>/dev/null)
|
||||
installed_version=$(php -r "require '/config/www/nextcloud/config/config.php'; echo \$CONFIG['version'];" 2>/dev/null)
|
||||
@ -156,3 +149,10 @@ if (occ app:list --no-interaction | grep -q richdocumentscode) 2>/dev/null; then
|
||||
APP=$(occ app:list --no-interaction | grep richdocumentscode | awk -F ' ' '{print $2}' | tr -d ':')
|
||||
occ app:remove --no-interaction "${APP}" 2>/dev/null
|
||||
fi
|
||||
|
||||
# set data directory
|
||||
if [ ! -s /config/www/nextcloud/config/config.php ]; then
|
||||
echo -e "<?php\n\$CONFIG = array (\n 'datadirectory' => '/data',\n);" >/config/www/nextcloud/config/config.php
|
||||
elif [ -f /config/www/nextcloud/config/config.php ]; then
|
||||
sed -i "s|/app/www/public/data|/data|g" /config/www/nextcloud/config/config.php
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user