#!/bin/bash help() { echo "Usage: doinit-local [ -h | -help | --help | ]" echo "Init borgmatic configuration for the backup computer." } # help=0 if (( $# != 0)); then help else echo "== Create the borgmatic configuration file." cp /srv/borg/models/model-conf-local.yaml /etc/borgmatic.d/$(hostname).yaml echo "== Verify the bogmatic configuration file." validate-borgmatic-config echo "== Create the repository directory." /srv/borg/bin/doinit $(hostname) fi