Mail archive
alpine-devel

[alpine-devel] [PATCH] main/postgresql/pg-restore.initd

From: Nathan Angelacos <nangel_at_alpinelinux.org>
Date: Mon, 15 Aug 2011 13:16:17 +0000

From: Nathan Angelacos <nangel_at_tetrasec.net>

        add a "purge" command - delete the temporary database backup
---
 main/postgresql/pg-restore.initd |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/main/postgresql/pg-restore.initd b/main/postgresql/pg-restore.initd
index 91c69d1..13462fe 100644
--- a/main/postgresql/pg-restore.initd
+++ b/main/postgresql/pg-restore.initd
_at_@ -2,7 +2,7 @@
 
 . /etc/conf.d/postgresql
 
-opts="${opts} dump restore"
+opts="${opts} dump restore purge"
 
 depend() {
 	need postgresql
_at_@ -27,6 +27,13 @@ dump() {
 	eend $?
 }
 
+purge() {
+	yesno "$PGDUMP" && return 0
+	ebegin "Removing temporary $PGDUMP PostgreSQL backup"
+	rm -f "$PGDUMP" 
+	eend $?
+}
+
 start() {
 	restore	
 }
-- 
1.7.6
---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Mon Aug 15 2011 - 13:16:17 UTC