summaryrefslogtreecommitdiffstats
path: root/main/postgresql/pg-restore.initd
diff options
context:
space:
mode:
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 1cc4da5c8..f6075bca2 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() {