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

From: Nathan Angelacos <[email-masked]>
Date: Mon, 15 Aug 2011 13:16:17 +0000

From: Nathan Angelacos <[email-masked]>

	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
@@ -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	
 }
-- 
1.7.6

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---