diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-11-07 09:12:09 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-11-07 09:12:09 +0000 |
commit | 558388f10a0fd7b392d8ab5761ccfddf79485ede (patch) | |
tree | 528f0c4558792d25fd50168e6c23ef649c63397c /main/postgresql/pg-restore.initd | |
parent | b3b060d72e80703b36092bce96ad5490b313eeb7 (diff) | |
download | aports-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.initd | 9 |
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() { |