From 7845936bf0dde72296c348f54125060ea4646d2d Mon Sep 17 00:00:00 2001 From: Vivek Shankar Date: Fri, 27 Dec 2024 15:52:47 +0530 Subject: [PATCH] pg-log-folder-create-if-not-present Signed-off-by: Vivek Shankar --- .../automate-backend-postgresql/habitat/config/functions.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/automate-backend-postgresql/habitat/config/functions.sh b/components/automate-backend-postgresql/habitat/config/functions.sh index 2a9e2a464a0..cb62c49d3ee 100644 --- a/components/automate-backend-postgresql/habitat/config/functions.sh +++ b/components/automate-backend-postgresql/habitat/config/functions.sh @@ -189,6 +189,11 @@ ensure_dir_ownership() { pg_log_dir={{pkg.svc_var_path}}/pg_log if [ -d "$pg_log_dir" ]; then chmod 0644 "$pg_log_dir" + else + echo "pg_log directory does not exist" + mkdir -p "$pg_log_dir" + chmod 0644 "$pg_log_dir" + ls -l "$pg_log_dir" fi }