backup-docker/init.sh
Niklas 4d7df3a39e
All checks were successful
continuous-integration/drone/push Build is passing
added init script
2021-03-29 22:55:10 +02:00

14 lines
348 B
Bash
Executable File

#!/bin/sh
set -e
[ -z "${RCLONE_REMOTE}" ] && echo "\$RCLONE_REMOTE is not set" && exit 1
[ -z "${RCLONE_CONFIG}" ] && echo "\$RCLONE_CONFIG is not set" && exit 1
[ -z "${RESTIC_PASSWORD}" ] && echo "\$RESTIC_PASSWORD is not set" && exit 1
echo "Init new repo"
restic -r "rclone:$RCLONE_REMOTE" init
echo "Created new repo at $RCLONE_REMOTE"