summaryrefslogtreecommitdiffstats
path: root/main/postgresql/postgresql.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-09-24 15:02:28 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-09-24 15:02:28 +0000
commit2201bb19f8db8978d3573f64eb67d5e0ef33bb4a (patch)
treedc5c7d1f1197b58711cd28635ba3a5655332328b /main/postgresql/postgresql.initd
parent4e336ad781863702aa75b66b6013e0f151e1f27b (diff)
downloadaports-2201bb19f8db8978d3573f64eb67d5e0ef33bb4a.tar.bz2
aports-2201bb19f8db8978d3573f64eb67d5e0ef33bb4a.tar.xz
main/postgresql: check if data directory is empty on setup
Diffstat (limited to 'main/postgresql/postgresql.initd')
-rw-r--r--main/postgresql/postgresql.initd1
1 files changed, 1 insertions, 0 deletions
diff --git a/main/postgresql/postgresql.initd b/main/postgresql/postgresql.initd
index 48b95b3ea..e7941648c 100644
--- a/main/postgresql/postgresql.initd
+++ b/main/postgresql/postgresql.initd
@@ -98,6 +98,7 @@ reload() {
setup() {
ebegin "Creating a new PostgreSQL database cluster"
+ rmdir "${PGDATA}" 2>/dev/null
if [ -d "${PGDATA}" ] ; then
eend 1 "${PGDATA} already exist"
return