Skip to content

Commit

Permalink
nc21 migration: avoid occ failure
Browse files Browse the repository at this point in the history
  • Loading branch information
gsanchietti committed Jun 10, 2021
1 parent d359015 commit 5c8c51c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions root/etc/e-smith/events/actions/nethserver-nextcloud-conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ fi

if [[ -n $database ]]; then
# we still use mariadb55, this is wrong we need rh-mariadb105

# Make sure loglevel is set to 2 (see https://github.com/nextcloud/server/pull/27334)
OCC "config:system:set loglevel --value=2 --type=integer"
OCC "maintenance:mode --on"
# accessibility takes a lot of PHP ressources but is a mandatory
# else white NC dashboard (nextcloud/server#25742)
Expand Down Expand Up @@ -87,6 +90,9 @@ if [[ -n $database ]]; then

if ! databaseTest ; then
OCC config:system:set dbhost --value="localhost:/run/rh-mariadb105-mariadb/nextcloud-mysql.sock" --type="string"
if [[ $? -gt 0 ]]; then
exitOnError "[ERROR] Can't configure socket for mysql database"
fi
/usr/bin/mysql -e "drop database nextcloud;"

# Alter database for migration
Expand Down

0 comments on commit 5c8c51c

Please sign in to comment.