|
70 | 70 |
|
71 | 71 | fi |
72 | 72 |
|
73 | | - if ! grep -q "${MONITOR_USER}" "${CONFIG_PATH}"/"${HBA_FILE}" ; then |
| 73 | + if ! grep -q "${MONITOR_USER}" "${CONFIG_PATH%/}"/"${HBA_FILE}" ; then |
74 | 74 | print_notice "[configure_monitoring] Adding '${MONITOR_USER}' to '${HBA_FILE}'" |
75 | | - echo "host all ${MONITOR_USER} localhost md5" >> "${CONFIG_PATH}"/"${HBA_FILE}" |
| 75 | + echo "host all ${MONITOR_USER} localhost md5" >> "${CONFIG_PATH%/}"/"${HBA_FILE}" |
76 | 76 | fi |
77 | 77 | else |
78 | 78 | print_debug "[configure_monitoring] Deleting Monitor User: '${MONITOR_USER}'" |
@@ -107,9 +107,9 @@ configure_replication() { |
107 | 107 | EOSQL |
108 | 108 | fi |
109 | 109 |
|
110 | | - if ! grep -q "${REPLICATION_USER}" "${CONFIG_PATH}"/"${HBA_FILE}" ; then |
| 110 | + if ! grep -q "${REPLICATION_USER}" "${CONFIG_PATH%/}"/"${HBA_FILE}" ; then |
111 | 111 | print_notice "[configure_replication] Adding '${REPLICATION_USER}/${REPLICATION_IP_ALLOW}' to '${HBA_FILE}'" |
112 | | - echo "host replication ${REPLICATION_USER} ${REPLICATION_IP_ALLOW} md5" >> "${CONFIG_PATH}"/"${HBA_FILE}" |
| 112 | + echo "host replication ${REPLICATION_USER} ${REPLICATION_IP_ALLOW} md5" >> "${CONFIG_PATH%/}"/"${HBA_FILE}" |
113 | 113 | fi |
114 | 114 | ;; |
115 | 115 | esac |
@@ -225,15 +225,15 @@ configure_server() { |
225 | 225 | case "${LOG_FORMAT,,}" in |
226 | 226 | csv ) |
227 | 227 | log_format=csvlog |
228 | | - create_logrotate postgresql "${LOG_PATH}"/"${LOG_FILE%.*}".csv postgres postgres |
| 228 | + create_logrotate postgresql "${LOG_PATH%/}"/"${LOG_FILE%.*}".csv postgres postgres |
229 | 229 | ;; |
230 | 230 | json ) |
231 | 231 | log_format=jsonlog |
232 | | - create_logrotate postgresql "${LOG_PATH}"/"${LOG_FILE%.*}".json postgres postgres |
| 232 | + create_logrotate postgresql "${LOG_PATH%/}"/"${LOG_FILE%.*}".json postgres postgres |
233 | 233 | ;; |
234 | 234 | normal | default | stderr | * ) |
235 | 235 | log_format=stderr |
236 | | - create_logrotate postgresql "${LOG_PATH}"/"${LOG_FILE}" postgres postgres |
| 236 | + create_logrotate postgresql "${LOG_PATH%/}"/"${LOG_FILE}" postgres postgres |
237 | 237 | ;; |
238 | 238 | esac |
239 | 239 | ;; |
@@ -280,7 +280,7 @@ EOREPLICATIONHOTSTANDBY |
280 | 280 | sanity_var "REPLICATION_PORT" "listening port of replication host" |
281 | 281 | sanity_var "REPLICATION_USER" "replication user on replication host" |
282 | 282 | sanity_var "REPLICATION_PASS" "replication password for user on replication host" |
283 | | - cat <<EOREPLICATIONRECOVERY | silent sudo -u postgres tee "${CONFIG_CUSTOM_PATH}"/replication-recovery.conf |
| 283 | + cat <<EOREPLICATIONRECOVERY | silent sudo -u postgres tee "${CONFIG_CUSTOM_PATH%/}"/replication-recovery.conf |
284 | 284 | standby_mode = 'on' |
285 | 285 | primary_conninfo = 'host=${REPLICATION_HOST} port=${REPLICATION_PORT} user=${REPLICATION_USER} password=${REPLICATION_PASS} sslmode=${REPLICATION_SSLMODE}' |
286 | 286 | EOREPLICATIONRECOVERY |
@@ -365,7 +365,7 @@ initialize_cluster() { |
365 | 365 | --username=${SUPERUSER_USER} \ |
366 | 366 | --pwfile=/tmp/.pgpassword \ |
367 | 367 | ${initdb_args} ${DATA_PATH} |
368 | | - rm -rf "${DATA_PATH}"/*.conf \ |
| 368 | + rm -rf "${DATA_PATH%/}"/*.conf \ |
369 | 369 | /tmp/.pgpassword |
370 | 370 | fi |
371 | 371 | if [ "$(dirname ${CONFIG_CUSTOM_PATH%/})" = "${DATA_PATH%/}" ] ; then |
|
0 commit comments