From b2a3ccbc03b7275547aa2f054e3d546723a4d910 Mon Sep 17 00:00:00 2001 From: Ricardo Cropalato Melo Date: Mon, 29 Apr 2024 11:04:33 -0400 Subject: [PATCH] [bitnami/postgresql] Add symlink command (#65730) - Add symbolic link from log files and /dev/stdout. It will support custom log_destination. Signed-off-by: Ricardo Melo --- .../rootfs/opt/bitnami/scripts/postgresql/postunpack.sh | 2 ++ .../rootfs/opt/bitnami/scripts/postgresql/postunpack.sh | 2 ++ .../rootfs/opt/bitnami/scripts/postgresql/postunpack.sh | 2 ++ .../rootfs/opt/bitnami/scripts/postgresql/postunpack.sh | 2 ++ .../rootfs/opt/bitnami/scripts/postgresql/postunpack.sh | 2 ++ 5 files changed, 10 insertions(+) diff --git a/bitnami/postgresql/12/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh b/bitnami/postgresql/12/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh index a2531a5f168f..1fa8e24f8c48 100755 --- a/bitnami/postgresql/12/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh +++ b/bitnami/postgresql/12/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh @@ -28,3 +28,5 @@ cp -r "${POSTGRESQL_CONF_DIR}/"* "$POSTGRESQL_DEFAULT_CONF_DIR" # Redirect all logging to stdout ln -sf /dev/stdout "$POSTGRESQL_LOG_DIR/postgresql.log" +ln -sf /dev/stdout "$POSTGRESQL_LOG_DIR/postgresql.csv" +ln -sf /dev/stdout "$POSTGRESQL_LOG_DIR/postgresql.json" diff --git a/bitnami/postgresql/13/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh b/bitnami/postgresql/13/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh index a2531a5f168f..1fa8e24f8c48 100755 --- a/bitnami/postgresql/13/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh +++ b/bitnami/postgresql/13/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh @@ -28,3 +28,5 @@ cp -r "${POSTGRESQL_CONF_DIR}/"* "$POSTGRESQL_DEFAULT_CONF_DIR" # Redirect all logging to stdout ln -sf /dev/stdout "$POSTGRESQL_LOG_DIR/postgresql.log" +ln -sf /dev/stdout "$POSTGRESQL_LOG_DIR/postgresql.csv" +ln -sf /dev/stdout "$POSTGRESQL_LOG_DIR/postgresql.json" diff --git a/bitnami/postgresql/14/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh b/bitnami/postgresql/14/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh index a2531a5f168f..1fa8e24f8c48 100755 --- a/bitnami/postgresql/14/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh +++ b/bitnami/postgresql/14/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh @@ -28,3 +28,5 @@ cp -r "${POSTGRESQL_CONF_DIR}/"* "$POSTGRESQL_DEFAULT_CONF_DIR" # Redirect all logging to stdout ln -sf /dev/stdout "$POSTGRESQL_LOG_DIR/postgresql.log" +ln -sf /dev/stdout "$POSTGRESQL_LOG_DIR/postgresql.csv" +ln -sf /dev/stdout "$POSTGRESQL_LOG_DIR/postgresql.json" diff --git a/bitnami/postgresql/15/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh b/bitnami/postgresql/15/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh index a2531a5f168f..1fa8e24f8c48 100755 --- a/bitnami/postgresql/15/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh +++ b/bitnami/postgresql/15/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh @@ -28,3 +28,5 @@ cp -r "${POSTGRESQL_CONF_DIR}/"* "$POSTGRESQL_DEFAULT_CONF_DIR" # Redirect all logging to stdout ln -sf /dev/stdout "$POSTGRESQL_LOG_DIR/postgresql.log" +ln -sf /dev/stdout "$POSTGRESQL_LOG_DIR/postgresql.csv" +ln -sf /dev/stdout "$POSTGRESQL_LOG_DIR/postgresql.json" diff --git a/bitnami/postgresql/16/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh b/bitnami/postgresql/16/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh index a2531a5f168f..1fa8e24f8c48 100755 --- a/bitnami/postgresql/16/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh +++ b/bitnami/postgresql/16/debian-12/rootfs/opt/bitnami/scripts/postgresql/postunpack.sh @@ -28,3 +28,5 @@ cp -r "${POSTGRESQL_CONF_DIR}/"* "$POSTGRESQL_DEFAULT_CONF_DIR" # Redirect all logging to stdout ln -sf /dev/stdout "$POSTGRESQL_LOG_DIR/postgresql.log" +ln -sf /dev/stdout "$POSTGRESQL_LOG_DIR/postgresql.csv" +ln -sf /dev/stdout "$POSTGRESQL_LOG_DIR/postgresql.json"