diff --git a/nextcloud/hooks/sql_database-relation-joined b/nextcloud/hooks/sql_database-relation-joined index ce02631..2d45c1d 100755 --- a/nextcloud/hooks/sql_database-relation-joined +++ b/nextcloud/hooks/sql_database-relation-joined @@ -44,11 +44,12 @@ if [ -e "$CONFIGFILE" ] && grep "^ 'dbuser' => '" "$CONFIGFILE" >/dev/null; the exit 1 ;; esac - + sed -i 's/\r//' "$CONFIGFILE" ## Remove DOS/WIN carriage returns if any sed -ri "s/^( 'dbuser' => ')(.*)(',)$/\1${quoted_user}\3/g;\ s/^( 'dbpassword' => ')(.*)(',)$/\1${quoted_password}\3/g;\ s/^( 'dbtype' => ')(.*)(',)$/\1${nextcloud_type}\3/g;\ s/^( 'dbhost' => ')(.*)(',)$/\1${MASTER_TARGET_SERVICE_NAME}\3/g;\ + s/^( 'dbname' => ')(.*)(',)$/\1${DBNAME}\3/g;\ " "$CONFIGFILE" else