[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-sandcastle-ng] branch master updated: move exchange master key di
From: |
gnunet |
Subject: |
[taler-sandcastle-ng] branch master updated: move exchange master key dir to a separate volume |
Date: |
Fri, 28 Jun 2024 14:37:11 +0200 |
This is an automated email from the git hooks/post-receive script.
devan-carpenter pushed a commit to branch master
in repository sandcastle-ng.
The following commit(s) were added to refs/heads/master by this push:
new 3ae088a move exchange master key dir to a separate volume
3ae088a is described below
commit 3ae088af4b138878c97aa1295826c322daccf9c9
Author: Devan Carpenter <devan@taler.net>
AuthorDate: Thu Jun 27 18:19:52 2024 -0400
move exchange master key dir to a separate volume
we want to be able to destroy the main data volume while keeping the
master key around.
this attempts to migrate the key to the new volume if it already exists
is the main data volume
resolves mantis bug #8293
---
sandcastle-run | 1 +
scripts/demo/setup-sandcastle.sh | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+)
diff --git a/sandcastle-run b/sandcastle-run
index 83d7123..cc1f155 100755
--- a/sandcastle-run
+++ b/sandcastle-run
@@ -58,6 +58,7 @@ exec podman run \
--name taler-sandcastle \
--systemd=always \
-v talerdata:/talerdata:Z \
+ -v talerdata_persistent:/talerdata_persistent:Z \
$OVERRIDES \
-v $PWD/scripts:/scripts:Z \
-v $PWD/scripts/$SETUP_NAME:/provision:Z \
diff --git a/scripts/demo/setup-sandcastle.sh b/scripts/demo/setup-sandcastle.sh
index ca3a3f6..d10fb0a 100755
--- a/scripts/demo/setup-sandcastle.sh
+++ b/scripts/demo/setup-sandcastle.sh
@@ -94,10 +94,31 @@ function lift_dir() {
fi
}
+function persist_exchange_key() {
+ src=$1
+ target=$2
+ if [[ -L "$src" ]]; then
+ # be idempotent
+ echo "$src is already a symlink"
+ elif [[ -d /talerdata_persistent/$target ]]; then
+ echo "symlinking existing /talerdata_persistent/$target"
+ rm -rf "$src"
+ ln -s "/talerdata_persistent/$target" "$src"
+ # if the directory is empty then we want to attempt to
+ # move the keys over from the main data dir.
+ # we check for an empty dir using "ls -A"
+ elif [[ -z "$(ls -A /talerdata_persistent/$target)" ]]; then
+ echo "symlinking new /talerdata_persistent/$target"
+ mv "/talerdata/var-lib-taler/$target" "/talerdata_persistent/"
+ ln -s "/talerdata_persistent/$target" "$src"
+ fi
+}
+
lift_dir /var/lib/taler var-lib-taler
lift_dir /etc/taler etc-taler
lift_dir /etc/libeufin etc-libeufin
lift_dir /var/lib/postgresql var-lib-postgresql
+persist_exchange_key /var/lib/taler/exchange-offline exchange-offline
# Caddy configuration.
# We use the caddy reverse proxy with automatic
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-sandcastle-ng] branch master updated: move exchange master key dir to a separate volume,
gnunet <=