#!/usr/bin/env bash # Copyright (c) 2021-2025 community-scripts ORG # Author: MickLesk (CanbiZ) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://garagehq.deuxfleurs.fr/ source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors setting_up_container network_check update_os msg_info "Preparing directories" mkdir -p /var/lib/garage/meta /var/lib/garage/data /var/lib/garage/snapshots msg_ok "Prepared directories" msg_info "Setup Garage packages" $STD apk add --no-cache garage garage-openrc openssl msg_ok "Setup Garage packages" # msg_info "Generating RPC secret" # if [[ ! -s /etc/garage.rpc_secret ]]; then # openssl rand -hex 32 | tr -d '\n' >/etc/garage.rpc_secret # chmod 600 /etc/garage.rpc_secret # fi # msg_ok "Generated RPC secret" # msg_info "Generating tokens" # if [[ ! -s /etc/garage.tokens.env ]]; then # ADMIN_TOKEN="$(openssl rand -base64 32)" # METRICS_TOKEN="$(openssl rand -base64 32)" # cat >/etc/garage.tokens.env </etc/garage.toml <