From 5d01d717486f100ffe38612a18e253c51dfdd75a Mon Sep 17 00:00:00 2001 From: ns212 Date: Sat, 9 Oct 2021 13:36:43 +0100 Subject: [PATCH] interbtc-parachain: implement snapshot download --- charts/polkabtc-parachain/templates/statefulset.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/polkabtc-parachain/templates/statefulset.yaml b/charts/polkabtc-parachain/templates/statefulset.yaml index 8e0209c..278e121 100644 --- a/charts/polkabtc-parachain/templates/statefulset.yaml +++ b/charts/polkabtc-parachain/templates/statefulset.yaml @@ -113,12 +113,13 @@ spec: - sh - -c - | + set -e FILE="{{ .Values.basePath }}/polkashots-imported" if [ ! -f "$FILE" ]; then echo "Downloading relaychain snapshot." apk add --no-cache p7zip wget {{ .Values.snapshotDownload.url }} -O snapshot.7z - 7z x snapshot.7z -o{{ .Values.basePath }}{{ .Values.snapshotDownload.destPath }} + 7z x -y snapshot.7z -o{{ .Values.basePath }}{{ .Values.snapshotDownload.destPath }} rm -v snapshot.7z touch "$FILE" else