diff options
author | Nathan Angelacos <nangel@tetrasec.net> | 2011-08-15 13:16:17 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-08-15 09:04:30 +0000 |
commit | 18c69f1242a853aa8b93698cc704b56af8cb489f (patch) | |
tree | 724180e9afa2bc105390e0ab19ec15d364f9ec01 /main/postgresql | |
parent | ef8592fe813bd377b5da59e9e2c4ad9ea9a45eb4 (diff) | |
download | aports-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.initd | 9 |
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 } |