|
@ -34,8 +34,23 @@ if [ -e "$CONFIGFILE" ] && grep "^ 'dbuser' => '" "$CONFIGFILE" >/dev/null; the |
|
|
quoted_user="${quoted_user//\'/\\\\\'}" |
|
|
quoted_user="${quoted_user//\'/\\\\\'}" |
|
|
quoted_password="${PASSWORD//\\/\\\\\\\\\\}" |
|
|
quoted_password="${PASSWORD//\\/\\\\\\\\\\}" |
|
|
quoted_password="${quoted_password//\'/\\\\\'}" |
|
|
quoted_password="${quoted_password//\'/\\\\\'}" |
|
|
|
|
|
case "$TYPE" in |
|
|
|
|
|
mysql) |
|
|
|
|
|
nextcloud_type="mysql";; |
|
|
|
|
|
postgres) |
|
|
|
|
|
nextcloud_type="pgsql";; |
|
|
|
|
|
*) |
|
|
|
|
|
err "Unknown type '$TYPE' for database." |
|
|
|
|
|
exit 1 |
|
|
|
|
|
;; |
|
|
|
|
|
esac |
|
|
|
|
|
|
|
|
sed -ri "s/^( 'dbuser' => ')(.*)(',)$/\1${quoted_user}\3/g;\ |
|
|
sed -ri "s/^( 'dbuser' => ')(.*)(',)$/\1${quoted_user}\3/g;\ |
|
|
s/^( 'dbpassword' => ')(.*)(',)$/\1${quoted_password}\3/g;" "$CONFIGFILE" |
|
|
|
|
|
|
|
|
s/^( 'dbpassword' => ')(.*)(',)$/\1${quoted_password}\3/g;\ |
|
|
|
|
|
s/^( 'dbtype' => ')(.*)(',)$/\1${nextcloud_type}\3/g;\ |
|
|
|
|
|
s/^( 'dbhost' => ')(.*)(',)$/\1${MASTER_TARGET_SERVICE_NAME}\3/g;\ |
|
|
|
|
|
" "$CONFIGFILE" |
|
|
|
|
|
|
|
|
else |
|
|
else |
|
|
|
|
|
|
|
|
## These variable are not used by current docker image after first install |
|
|
## These variable are not used by current docker image after first install |
|
|