#!/bin/sh HOSTNAME=${HOSTNAME:-$(hostname)} [ -d "/var/backups" ] || mkdir -p /var/backups [ -f "/var/backups/$HOSTNAME.secret" ] || openssl rand -hex 64 > /var/backups/$HOSTNAME.secret restic init \ -r /var/backups/$HOSTNAME \ -p /var/backups/$HOSTNAME.secret