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 }