borgthismachine: fix date string for snapshots

This commit is contained in:
layman 2018-12-07 00:01:51 +01:00
parent 6b92513ecc
commit db6fb5b84a

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
if [[ "$HOME" == "/" ]] ; then
if [[ "$HOME" == "/" || -z "$HOME" ]] ; then
HOME="/root/"
fi
@ -45,7 +45,7 @@ export BORG_PASSPHRASE
export HOME
echo using repo: $MYREPO
SNAPSHOT="$(date +%a-%Y-%m-%d)"
SNAPSHOT="$(date +%Y-%m-%d-%a)"
echo #### borg backup ####
if [[ -n "${MAC}" ]] ; then