Skip to content

Commit

Permalink
Issue 1492 (#1500)
Browse files Browse the repository at this point in the history
* issue 1492  update postgres init to check for directory and create if not there
  • Loading branch information
cs1867 authored Jan 8, 2025
1 parent 418668d commit 6f4b121
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion postgresql-init/unibuild-packaging/rpm/postgresql-init.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Name: postgresql-init
# Note that the dot after this is for versions of this package rather
# than the Pg relese.
Version: %{_pscheduler_postgresql_version}.1
Release: 1%{?dist}
Release: 2%{?dist}

Summary: Initializes PostgreSQL
BuildArch: noarch
Expand Down Expand Up @@ -66,6 +66,18 @@ then
exit 0
fi
#TODO Remove if updates are made to future postgres version that
# create the following directory during initalization
#
#Check for directory and if not create it and set permissions
if [ ! -d "%{_rundir}/postgresql/" ]; then
echo "%{_rundir}/postgresql/ does not exist. Creating it..."
mkdir -p "%{_rundir}/postgresql/"
chown postgres:postgres "%{_rundir}/postgresql/"
chmod 755 "%{_rundir}/postgresql/"
fi
# Initialize PostgreSQL
Expand Down

0 comments on commit 6f4b121

Please sign in to comment.