Skip to content

Commit 19a90e7

Browse files
authored
Merge pull request #278 from metwork-framework/max_connections
build: fix previous changes concerning max_connections
2 parents beb1061 + e905168 commit 19a90e7

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

adm/mfxxx.init.custom

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ if test "${MFBASE_POSTGRESQL_FLAG}" = "1"; then
4747
fi
4848
rm -f "/tmp/initdb_pwfile.$$"
4949

50-
sed -i '/^max_connections = 100*/^#max_connections (default 100) is set in included file (see below)/' ${MFBASE_POSTGRESQL_DATA_DIR}/postgresql.conf
5150
echo "include '${MFMODULE_RUNTIME_HOME}/tmp/config_auto/postgresql.conf'" >>${MFBASE_POSTGRESQL_DATA_DIR}/postgresql.conf
5251
PG_HBA="${MFBASE_POSTGRESQL_DATA_DIR}/pg_hba.conf"
5352
cat >${PG_HBA} <<EOF

adm/mfxxx.start.custom

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@
2121
fi
2222
{% endblock %}
2323

24+
{% block custom %}
25+
# Comment line "max_connections = " as it is now provided from config in ${MFMODULE_RUNTIME_HOME}/tmp/config_auto/postgresql.conf
26+
grep '^max_connections =' ${MFBASE_POSTGRESQL_DATA_DIR}/postgresql.conf >/dev/null 2>&1
27+
if test $? -eq 0; then
28+
sed -i 's/^max_connections = */#max_connections (default 100) is set in included file (see below)/' ${MFBASE_POSTGRESQL_DATA_DIR}/postgresql.conf
29+
fi
30+
{% endblock %}
31+

0 commit comments

Comments
 (0)