summaryrefslogtreecommitdiffstats
path: root/main/postgresql
diff options
context:
space:
mode:
Diffstat (limited to 'main/postgresql')
-rw-r--r--main/postgresql/pg-restore.initd9
1 files changed, 8 insertions, 1 deletions
diff --git a/main/postgresql/pg-restore.initd b/main/postgresql/pg-restore.initd
index 91c69d18f..13462fe57 100644
--- a/main/postgresql/pg-restore.initd
+++ b/main/postgresql/pg-restore.initd
@@ -2,7 +2,7 @@
. /etc/conf.d/postgresql
-opts="${opts} dump restore"
+opts="${opts} dump restore purge"
depend() {
need postgresql
@@ -27,6 +27,13 @@ dump() {
eend $?
}
+purge() {
+ yesno "$PGDUMP" && return 0
+ ebegin "Removing temporary $PGDUMP PostgreSQL backup"
+ rm -f "$PGDUMP"
+ eend $?
+}
+
start() {
restore
}