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 | |
parent | ef8592fe813bd377b5da59e9e2c4ad9ea9a45eb4 (diff) | |
download | alpine_aports-18c69f1242a853aa8b93698cc704b56af8cb489f.tar.bz2 alpine_aports-18c69f1242a853aa8b93698cc704b56af8cb489f.tar.xz alpine_aports-18c69f1242a853aa8b93698cc704b56af8cb489f.zip |
main/postgresql/pg-restore.initd
add a "purge" command - delete the temporary database backup
-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 91c69d18f4..13462fe573 100644 --- a/main/postgresql/pg-restore.initd +++ b/main/postgresql/pg-restore.initd | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | . /etc/conf.d/postgresql | 3 | . /etc/conf.d/postgresql |
4 | 4 | ||
5 | opts="${opts} dump restore" | 5 | opts="${opts} dump restore purge" |
6 | 6 | ||
7 | depend() { | 7 | depend() { |
8 | need postgresql | 8 | need postgresql |
@@ -27,6 +27,13 @@ dump() { | |||
27 | eend $? | 27 | eend $? |
28 | } | 28 | } |
29 | 29 | ||
30 | purge() { | ||
31 | yesno "$PGDUMP" && return 0 | ||
32 | ebegin "Removing temporary $PGDUMP PostgreSQL backup" | ||
33 | rm -f "$PGDUMP" | ||
34 | eend $? | ||
35 | } | ||
36 | |||
30 | start() { | 37 | start() { |
31 | restore | 38 | restore |
32 | } | 39 | } |