Skip to content

Commit

Permalink
Small additional bugfix related to issue #21 to keep newlines during …
Browse files Browse the repository at this point in the history
…variable processing
  • Loading branch information
rolandstirnimann committed Mar 24, 2023
1 parent e0d20ca commit 9b41fef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Binary file modified bundle/pgoperate-4.5.tar
Binary file not shown.
4 changes: 3 additions & 1 deletion lib/shared.lib
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,11 @@ set_conf_param "$PGSQL_BASE/etc/postgresql.conf" max_wal_senders "10"
set_conf_param "$PGSQL_BASE/etc/postgresql.conf" max_replication_slots "10"
set_conf_param "$PGSQL_BASE/etc/postgresql.conf" track_commit_timestamp "on"

# Do not remove the double quotes from the while loop input around the "$(echo...)"!
# Those are curcial that newlines within the variable PG_DEF_PARAMS are kept!
while read -r param; do
[[ ${#param} -gt 0 ]] && set_conf_param "$PGSQL_BASE/etc/postgresql.conf" $(echo $param | cut -s -d"=" -f1) "$(echo $param | cut -s -d"=" -f2-)"
done <<< $(echo "$PG_DEF_PARAMS" | grep -E -v "^[ ]*#")
done <<< "$(echo "$PG_DEF_PARAMS" | grep -E -v "^[ ]*#")"

if [[ $PCTMEM -gt 0 ]]; then
local membytes=$(free -m | grep Mem | awk '{print $2}')
Expand Down

0 comments on commit 9b41fef

Please sign in to comment.