todo resolved

This commit is contained in:
2026-04-03 22:07:27 +01:00
parent bc6b27bb2c
commit 168027d893
3 changed files with 27 additions and 9 deletions

View File

@@ -1,10 +1,19 @@
#!/bin/bash
{% set arch = 'arm' if salt.grains.get('cpuarch').startswith('arm') else 'amd64' %}
{% if salt.grains.get('cpuarch').startswith('arm') %}
{% set arch = 'arm' %}
{% elif salt.grains.get('cpuarch') == 'aarch64' %}
{% set arch = 'arm64' %}
{% else %}
{% set arch = 'amd64' %}
{% endif %}
{% set restic_version = salt.pillar.get("restic:version") %}
URL="https://github.com/restic/restic/releases/download/v{{ restic_version }}/restic_{{ restic_version }}_linux_{{ arch }}.bz2"
wget --quiet "${URL}" -O - | bzip2 -cd > /bin/restic.tmp
echo "$URL"
wget --quiet "$URL" -O - | bzip2 -cd > /bin/restic.tmp
if [ $? -eq 0 ]; then
chmod +x /bin/restic.tmp
mv /bin/restic.tmp /bin/restic