Skip to content

Commit

Permalink
Test with env path
Browse files Browse the repository at this point in the history
  • Loading branch information
ptruessel committed Oct 21, 2024
1 parent 0e20f52 commit ba72344
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions config/backup/restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
# Activates the automatic export of variables
set -a

# Load the .env file
source ../../.env
# Get the directory of the current script
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Set the project root (assuming the script is two levels below the project root)
PROJECT_ROOT="$(dirname "$(dirname "$SCRIPT_DIR")")"

# Load the .env file from the project root
source "$PROJECT_ROOT/.env"

# Deactivates the automatic export of variables
set +a
Expand Down

0 comments on commit ba72344

Please sign in to comment.