bin: check for profile presence in backup-restic
This commit is contained in:
@@ -23,7 +23,14 @@ fi
|
|||||||
|
|
||||||
PROFILE=$1
|
PROFILE=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
PROFILE_ROOT=$CONFIG_ROOT/$PROFILE
|
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"
|
export RESTIC_PASSWORD_COMMAND="pass restic/$PROFILE/$HOSTNAME"
|
||||||
|
|
||||||
CMDLINE="restic backup --one-file-system --exclude-caches $DRY"
|
CMDLINE="restic backup --one-file-system --exclude-caches $DRY"
|
||||||
|
|||||||
Reference in New Issue
Block a user