Skip to content

Commit

Permalink
Fetch DbConfigPath and CraneBaseDir from global config file (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessOIer authored Dec 5, 2024
1 parent fde6f28 commit ede7741
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/WipeData.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ fi
mode=$1

# Read info from configuration file
conf_file=/etc/crane/database.yaml
base_dir=/var/crane/
global_conf_file=/etc/crane/config.yaml
conf_file=$(grep 'DbConfigPath:' "$global_conf_file" | awk '{print $2}')
base_dir=$(grep 'CraneBaseDir:' "$global_conf_file" | awk '{print $2}')

username=$(grep 'DbUser:' "$conf_file" | awk '{print $2}')
password=$(grep 'DbPassword:' "$conf_file" | awk -F\" '{print $2}')
Expand Down

0 comments on commit ede7741

Please sign in to comment.