X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from sp4.qcslink.com (sp4.qcslink.com [200.35.147.4]) by mail.alpinelinux.org (Postfix) with ESMTP id 3695EBD9AD for ; Mon, 15 Aug 2011 05:27:13 +0000 (UTC) Received: from sp4.qcslink.com (localhost.localdomain [127.0.0.1]) by sp4.qcslink.com (Postfix) with ESMTP id 31D9F1A4A8; Mon, 15 Aug 2011 01:27:02 -0400 (EDT) Received: from localhost.localdomain (c-98-234-43-98.hsd1.ca.comcast.net [98.234.43.98]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: nangel@nothome.org) by sp4.qcslink.com (Postfix) with ESMTPSA id B41DB1A461; Mon, 15 Aug 2011 01:27:01 -0400 (EDT) From: Nathan Angelacos To: alpine-devel@lists.alpinelinux.org Cc: Nathan Angelacos Subject: [alpine-devel] [PATCH] main/postgresql/pg-restore.initd Date: Mon, 15 Aug 2011 13:16:17 +0000 Message-Id: <1313414177-4854-1-git-send-email-nangel@alpinelinux.org> X-Mailer: git-send-email 1.7.6 X-Virus-Scanned: ClamAV using ClamSMTP X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: From: Nathan Angelacos 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: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---