#!/bin/bash # check for pwgen if ! command -v pwgen >/dev/null 2>&1 then echo "pwgen could not be found" source /etc/os-release if [ "$ID" = "arch" ]; then sudo pacman -S pwgen else exit 1 fi fi # check for rclone if ! command -v rclone >/dev/null 2>&1 then echo "pwgen could not be found" source /etc/os-release if [ "$ID" = "arch" ]; then sudo pacman -S rclone else exit 1 fi fi echo "---create unencrypted volume---" sudo rclone config pwgen -sy --num-passwords=1 32 echo "---create encrypted volume on previously created volume---" sudo rclone config echo "Now initialize all repos with:" echo "restic -r rclone:drive:path init"