Skip to content

Commit 258b693

Browse files
committed
dietpi-software: Nextcloud: add steps for possible ownCloud => Nextcloud migration
1 parent 8cef62b commit 258b693

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dietpi/dietpi-software

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4987,6 +4987,14 @@ The install script will now exit. After applying one of the the above, rerun die
49874987
local datadir_old=$(grep -m1 "^[[:blank:]]*'datadirectory'" "$config_php" | mawk -F\' '{print $4}')
49884988
G_EXEC mysql -e "update nextcloud.oc_storages set id = replace(id, 'local::${datadir_old%/}/', 'local::${datadir%/}/')"
49894989
G_CONFIG_INJECT "'datadirectory'" "'datadirectory' => '$datadir'," "$config_php" "'dbtype'"
4990+
# Patch for possible ownCloud => Nextcloud migration
4991+
if (( $(mawk -F[\'.] '/^\$OC_VersionString/{print $2}' /var/www/nextcloud/version.php) = 10 )) && grep -q "'10.13' => true," /var/www/nextcloud/version.php
4992+
then
4993+
G_CONFIG_INJECT "'10.14'" "'10.14' => true," /var/www/nextcloud/version.php "'10.13'"
4994+
G_CONFIG_INJECT "'10.15'" "'10.15' => true," /var/www/nextcloud/version.php "'10.14'"
4995+
G_CONFIG_INJECT "'10.16'" "'10.16' => true," /var/www/nextcloud/version.php "'10.15'"
4996+
fi
4997+
G_EXEC_OUTPUT=1 G_EXEC ncc upgrade # in case may need to run before other occ db:* calls below
49904998

49914999
elif ! grep -q "'installed' => true," "$config_php" 2>/dev/null; then
49925000

@@ -5079,6 +5087,8 @@ The install script will now exit. After applying one of the the above, rerun die
50795087

50805088
# On <1 GiB devices assure at least 512 MiB swap space are available to stand 512 MiB file uploads + increased PHP cache and session file usage: https://github.com/MichaIng/DietPi/issues/2293
50815089
(( $RAM_PHYS < 924 && $(free -m | mawk '/^Swap:/{print $2;exit}') < 512 )) && /boot/dietpi/func/dietpi-set_swapfile 512
5090+
5091+
G_EXEC ncc maintenance:mode --off
50825092
fi
50835093

50845094
if To_Install 168 coturn # Nextcloud Talk

0 commit comments

Comments
 (0)