31 lines
856 B
Bash
Executable File
31 lines
856 B
Bash
Executable File
#!/bin/bash
|
|
|
|
source lib/metascript.sh
|
|
|
|
defaultmetainit $@
|
|
|
|
rel_bind_folder=bind_folder
|
|
bind_folder=$(pwd)/$rel_bind_folder
|
|
|
|
$defer ./get_dbcontent.sh
|
|
|
|
# $defer ./setupdatabase.sh
|
|
|
|
log_info "See https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/db_conversion.html"
|
|
|
|
source ./config_db_query.sh
|
|
|
|
# convert localhost of host into container virtual bridge hostname mapping
|
|
#db_hostname=host.docker.internal
|
|
#db_hostname=host.containers.internal
|
|
# host loopback mapped address
|
|
db_hostname=10.1.1.13
|
|
# dbtype_nextcloud inherited from config_db_query
|
|
|
|
$defer ./run_occ.sh db:convert-type --password="$password" --port="$db_port" --all-apps "$dbtype_nextcloud" "$username" "$db_hostname" "$database_name"
|
|
|
|
if [[ $dbtype_nextcloud == mysql ]]
|
|
then
|
|
$defer ./run_occ.sh config:system:set mysql.utf8mb4 --type boolean --value="true"
|
|
fi
|