aboutsummaryrefslogtreecommitdiffstats
path: root/main/postgresql/pg-restore.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-11-07 09:12:09 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-11-07 09:12:09 +0000
commit558388f10a0fd7b392d8ab5761ccfddf79485ede (patch)
tree528f0c4558792d25fd50168e6c23ef649c63397c /main/postgresql/pg-restore.initd
parentb3b060d72e80703b36092bce96ad5490b313eeb7 (diff)
downloadaports-558388f10a0fd7b392d8ab5761ccfddf79485ede.tar.bz2
aports-558388f10a0fd7b392d8ab5761ccfddf79485ede.tar.xz
main/postgresql: fix init scripts for 9.2
- change some variables, {NICE,RUDE,FORCE}_TIMEOUT to correspond with gentoo variables, while still beeing backawards compatible - change data dir to 9.2 - patch initdb to not suggest how to start postgresql
Diffstat (limited to 'main/postgresql/pg-restore.initd')
-rw-r--r--main/postgresql/pg-restore.initd9
1 files changed, 3 insertions, 6 deletions
diff --git a/main/postgresql/pg-restore.initd b/main/postgresql/pg-restore.initd
index 1cc4da5c8f..f6075bca2d 100644
--- a/main/postgresql/pg-restore.initd
+++ b/main/postgresql/pg-restore.initd
@@ -1,8 +1,6 @@
#!/sbin/runscript
-. /etc/conf.d/postgresql
-
-opts="${opts} dump restore purge"
+extra_commands="${opts} dump restore purge"
depend() {
need postgresql
@@ -12,11 +10,10 @@ restore() {
yesno "$PGDUMP" && return 0
ebegin "Restoring PostgreSQL $PGDUMP"
psql -U ${PG_USER:-postgres} ${PSQL_OPTS} -f "$PGDUMP" >/dev/null 2>/dev/null
+ local res=$?
yesno "$KEEP_DUMP" || rm -f "$PGDUMP"
-
- su -l ${PGUSER} \
- -c "env PGDATA=\"${PGDATA}\" /usr/bin/pg_ctl reload " >/dev/null
eend $res
+ /etc/init.d/postgresql reload
}
dump() {