From d2f93cac2f213bab18d7a4f72d0f71abc96f5468 Mon Sep 17 00:00:00 2001 From: layman Date: Thu, 8 Jul 2021 15:52:59 +0200 Subject: [PATCH] borgthismachine: add some quotation marks --- borgthismachine.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/borgthismachine.sh b/borgthismachine.sh index f9638cd..eef2e5f 100755 --- a/borgthismachine.sh +++ b/borgthismachine.sh @@ -51,12 +51,12 @@ echo "using repo: $MYREPO snapshot: $SNAPSHOT" echo #### borg backup #### if [[ -n "${MAC}" ]] ; then - if ! ping -c 1 $BORGHOST &> /dev/null ; then - wakeonlan $MAC + if ! ping -c 1 "$BORGHOST" &> /dev/null ; then + wakeonlan "$MAC" #wakup may take some time sleep 10 else - echo $BORGHOST is up + echo "$BORGHOST is up" fi fi @@ -65,7 +65,7 @@ fi nice ionice -c 3 borg create --stats \ --exclude-caches \ --one-file-system \ - ${BORG_ARGS} \ + "${BORG_ARGS[@]}" \ $([[ -n "${BORG_EXCLUDE_PATTERN[*]}" ]] && printf " --exclude \"%s\" " "${BORG_EXCLUDE_PATTERN[@]}" ) \ $([[ -n "$BORG_EXCLUDE_FILE" ]] && printf " --exclude-from \"%s\" " "${BORG_EXCLUDE_FILE}" ) \ --exclude-if-present="$BORG_EXCLUDE_IF_PRESENT" \ @@ -82,8 +82,8 @@ if [[ "${APPENDONLY}" != "YES" ]] ; then time borg list -v $MYREPO echo RetVal = $? else - echo "#############" - echo "You should purge the repository from time to time" + echo ############# + echo You should purge the repository from time to time fi echo ##### borg end ######