aboutsummaryrefslogtreecommitdiffstats
path: root/main/postgresql/postgresql.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-03-29 12:28:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-03-29 12:28:31 +0000
commit64bce71141d9562664c0a852dd096978579ea5f8 (patch)
tree860c2a014423669b54fd94980c46833cfefa55cc /main/postgresql/postgresql.initd
parent09838439c042827adfa17b7cf387729c9bc03f71 (diff)
downloadaports-64bce71141d9562664c0a852dd096978579ea5f8.tar.bz2
aports-64bce71141d9562664c0a852dd096978579ea5f8.tar.xz
main/postgresql: depend on client. added pg-restore init.d script
New feature to restore backe up databases on bootup. Helps when you run postgresql databases from tmpfs.
Diffstat (limited to 'main/postgresql/postgresql.initd')
-rw-r--r--main/postgresql/postgresql.initd5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/postgresql/postgresql.initd b/main/postgresql/postgresql.initd
index e7941648c3..23b0acff4c 100644
--- a/main/postgresql/postgresql.initd
+++ b/main/postgresql/postgresql.initd
@@ -11,12 +11,15 @@ depend() {
}
checkconfig() {
- if [ ! -d "$PGDATA" ] ; then
+ [ -d "$PGDATA" ] && return 0
+
+ if [ -z "$AUTO_SETUP" ] || [ "$AUTO_SETUP" = "no" ]; then
eerror "Directory not found: $PGDATA"
eerror "Please make sure that PGDATA points to the right path."
eerror "You can run '/etc/init.d/postgresql setup' to setup a new database cluster."
return 1
fi
+ setup
}
start() {