bin: check for profile presence in backup-restic

This commit is contained in:
Paul Walker
2024-04-17 11:17:26 +01:00
parent 57d6727306
commit e8083cbdc4

View File

@@ -23,7 +23,14 @@ fi
PROFILE=$1
shift
PROFILE_ROOT=$CONFIG_ROOT/$PROFILE
if [ ! -d "$PROFILE_ROOT" ] ; then
echo "Profile '$PROFILE' not found in $CONFIG_ROOT"
exit 2
fi
export RESTIC_PASSWORD_COMMAND="pass restic/$PROFILE/$HOSTNAME"
CMDLINE="restic backup --one-file-system --exclude-caches $DRY"