Skip to content

Commit 00f0c26

Browse files
fix: only download restic if not already installed
1 parent 18ad399 commit 00f0c26

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

helm-chart/templates/cronjob.backups.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ spec:
4646
# install CLI dependencies
4747
hab pkg install core/gzip core/curl
4848
49-
# install restic
50-
hab pkg exec core/curl curl -L https://github.com/restic/restic/releases/download/v0.18.1/restic_0.18.1_linux_amd64.bz2 | bunzip2 > /bin/restic
51-
chmod +x /bin/restic
49+
if [ ! -f /bin/restic ]; then
50+
hab pkg exec core/curl curl -L https://github.com/restic/restic/releases/download/v0.18.1/restic_0.18.1_linux_amd64.bz2 | bunzip2 > /bin/restic
51+
chmod +x /bin/restic
52+
fi
5253
5354
# get composite service name
5455
composite_svc_name=\"\$(hab svc status | tail -n +2 | awk '{print \$1}' | grep -- "-composite/" | cut -d '/' -f 1,2)\"

0 commit comments

Comments
 (0)