From 9e1a065f6ed6e05737ca282a91008e0b6b2ba5b9 Mon Sep 17 00:00:00 2001 From: Ste Vaidis Date: Sat, 24 Dec 2022 18:26:57 +0200 Subject: [PATCH] start by go to current dir --- backup.sh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/backup.sh b/backup.sh index 4434ed2..c024ca7 100755 --- a/backup.sh +++ b/backup.sh @@ -1,16 +1,9 @@ #!/bin/bash -. ./backup.config +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +cd $SCRIPT_DIR -#IFS=$'\n' -#NOW=$(date +"%Y-%m-%d_%H:%M") -#LOG="/root/backup_$NOW.log" -#USB_DISK="" -#USB_PARTITION="" -#USB_MOUNT="/mnt/usb" -#LUKS_PASS_URL="192.168.1.199:9999/andthepasswordis" -#LUKS_PASS="" -#MAIL_RECIPIENT="ste.vaidis@gmail.com" +. ./backup.config function log() { echo -e "`date +'%d/%m/%Y %H:%M:%S'` | $1"