aboutsummaryrefslogtreecommitdiffstats
path: root/main/postgresql-bdr/postgresql-bdr.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/postgresql-bdr/postgresql-bdr.initd')
-rw-r--r--main/postgresql-bdr/postgresql-bdr.initd4
1 files changed, 1 insertions, 3 deletions
diff --git a/main/postgresql-bdr/postgresql-bdr.initd b/main/postgresql-bdr/postgresql-bdr.initd
index 673cd7b2af..90959bc92d 100644
--- a/main/postgresql-bdr/postgresql-bdr.initd
+++ b/main/postgresql-bdr/postgresql-bdr.initd
@@ -133,9 +133,7 @@ setup() {
echo mv "${PGDATA}"/* "${tmpdir}"
mv "${PGDATA}"/* "${tmpdir}" 2>/dev/null
- rm -rf "${PGDATA}"/* 2>/dev/null
- chown -Rf postgres:postgres "${PGDATA}"
- chmod 0700 "${PGDATA}"
+ checkpath -Dm 0700 -o postgres:postgres "${PGDATA}"
cd "${PGDATA}" # to avoid the: could not change directory to "/root"
su -c "/usr/bin/initdb --pgdata ${PGDATA}" postgres
local res=$?