summaryrefslogtreecommitdiff
path: root/harmony/postgresql/pg-restore.initd
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-08 02:02:24 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-08 02:02:24 -0500
commitfd2bb2f751c13b3c0c002b8e012810902b9da364 (patch)
tree17b2e38c966c9f96cfa568c1f572261a289590e6 /harmony/postgresql/pg-restore.initd
parentb0a5136bf3326ba38b360be288d06f9a27f2a4d2 (diff)
downloadpackages-fd2bb2f751c13b3c0c002b8e012810902b9da364.tar.gz
packages-fd2bb2f751c13b3c0c002b8e012810902b9da364.tar.bz2
packages-fd2bb2f751c13b3c0c002b8e012810902b9da364.tar.xz
packages-fd2bb2f751c13b3c0c002b8e012810902b9da364.zip
harmony -> system
Diffstat (limited to 'harmony/postgresql/pg-restore.initd')
-rw-r--r--harmony/postgresql/pg-restore.initd36
1 files changed, 0 insertions, 36 deletions
diff --git a/harmony/postgresql/pg-restore.initd b/harmony/postgresql/pg-restore.initd
deleted file mode 100644
index e9fe65c19..000000000
--- a/harmony/postgresql/pg-restore.initd
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/sbin/openrc-run
-
-extra_commands="${opts} dump restore purge"
-
-depend() {
- need postgresql
-}
-
-restore() {
- yesno "$PGDUMP" && return 0
- ebegin "Restoring PostgreSQL $PGDUMP"
- psql -U ${PG_USER:-postgres} ${PSQL_OPTS} -f "$PGDUMP" >/dev/null 2>/dev/null
- local res=$?
- yesno "$KEEP_DUMP" || rm -f "$PGDUMP"
- eend $res
- /etc/init.d/postgresql reload
-}
-
-dump() {
- yesno "$PGDUMP" && return 0
- mkdir -p "$( dirname "$PGDUMP" )"
- ebegin "Saving PostgreSQL databases to $PGDUMP"
- pg_dumpall -U ${PG_USER:-postgres} ${PG_DUMPALL_OPTS} -f "$PGDUMP"
- eend $?
-}
-
-purge() {
- yesno "$PGDUMP" && return 0
- ebegin "Removing temporary $PGDUMP PostgreSQL backup"
- rm -f "$PGDUMP"
- eend $?
-}
-
-start() {
- restore
-}