Skip to content

Commit

Permalink
Merge pull request #535 from PAWECOGmbH/development
Browse files Browse the repository at this point in the history
Test with .env path
  • Loading branch information
ptruessel authored Oct 21, 2024
2 parents 11baa06 + 0070875 commit e10686d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions config/backup/backup.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
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 e10686d

Please sign in to comment.