From 2945b2ce1ceea9abf270b6903ebfeed053ab83a7 Mon Sep 17 00:00:00 2001 From: FrederikBaerentsen Date: Thu, 6 Jun 2024 08:21:28 +0200 Subject: [PATCH] Using relative to script paths --- README.md | 1 + backup.sh | 7 +++++-- mountBackblaze.sh | 9 ++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c1fe19e..1466769 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,4 @@ - `mountBackblaze.sh`: Mount Backblaze B2 bucket using Restic. +- `techem.sh`: Download Water (hot/cold) and Heat statistics diff --git a/backup.sh b/backup.sh index 4a7c9e7..1f81016 100644 --- a/backup.sh +++ b/backup.sh @@ -1,6 +1,9 @@ #!/bin/bash -source ./account -source ./bucket + +parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) + +source "$parent_path/account" +source "$parent_path/bucket" FOLDER="/home/drudoo/Pi2/immich" diff --git a/mountBackblaze.sh b/mountBackblaze.sh index d5f38b2..64edbf7 100644 --- a/mountBackblaze.sh +++ b/mountBackblaze.sh @@ -1,12 +1,11 @@ #!/bin/bash -source ./account -source ./bucket +parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) + +source "$parent_path/account" +source "$parent_path/bucket" FOLDER='restic_mount' -# EDIT ABOVE - - echo 'Mounting '$RESTIC_BUCKET restic mount -r b2:$RESTIC_BUCKET /home/drudoo/$FOLDER