aboutsummaryrefslogtreecommitdiffstats
path: root/main/postgresql
diff options
context:
space:
mode:
authorNathan Angelacos <nangel@tetrasec.net>2011-08-15 13:16:17 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-08-15 09:04:30 +0000
commit18c69f1242a853aa8b93698cc704b56af8cb489f (patch)
tree724180e9afa2bc105390e0ab19ec15d364f9ec01 /main/postgresql
parentef8592fe813bd377b5da59e9e2c4ad9ea9a45eb4 (diff)
downloadaports-18c69f1242a853aa8b93698cc704b56af8cb489f.tar.bz2
aports-18c69f1242a853aa8b93698cc704b56af8cb489f.tar.xz
main/postgresql/pg-restore.initd
add a "purge" command - delete the temporary database backup
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 91c69d18f4..13462fe573 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
}