Skip to content

Commit

Permalink
Merge pull request #1 from IKNL/bugfix/minor-finding-after-first-install
Browse files Browse the repository at this point in the history
Bugfix/minor finding after first install
  • Loading branch information
frankcorneliusmartin authored Feb 26, 2024
2 parents 3906064 + 4934fdb commit 0695949
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ BLUEBERRY server.
name.
### Installing
To get started with these scripts, execute the following steps in `bash`:
Go to the home directory of the user that has `sudo` permissions and execute the
following steps in `bash`:
```bash
# Clone this repository to your local machine:
Expand Down
27 changes: 13 additions & 14 deletions create-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,6 @@ if [ "$WRITE_CONFIG_FILE" = true ]; then
export API_KEY=$API_KEY

# OMOP database settings
is_set_or_prompt "OMOP_PORT"
export OMOP_PORT=$OMOP_PORT
is_set_or_prompt "OMOP_DATABASE"
export OMOP_DATABASE=$OMOP_DATABASE
is_set_or_prompt "OMOP_USER"
export OMOP_USER=$OMOP_USER
is_set_or_prompt "OMOP_PASSWORD"
export OMOP_PASSWORD=$OMOP_PASSWORD
is_set_or_prompt "OMOP_CDM_SCHEMA"
export OMOP_CDM_SCHEMA=$OMOP_CDM_SCHEMA
is_set_or_prompt "OMOP_RESULT_SCHEMA"
export OMOP_RESULT_SCHEMA=$OMOP_RESULT_SCHEMA


if is_set "OMOP_HOST" "silent"; then
if is_set "DOCKER_SERVICE_CONTAINER_LABEL" "silent"; then
print_step "Using previous Docker service container label: $DOCKER_SERVICE_CONTAINER_LABEL"
Expand All @@ -83,6 +69,19 @@ if [ "$WRITE_CONFIG_FILE" = true ]; then
select_database_method
fi

is_set_or_prompt "OMOP_PORT"
export OMOP_PORT=$OMOP_PORT
is_set_or_prompt "OMOP_DATABASE"
export OMOP_DATABASE=$OMOP_DATABASE
is_set_or_prompt "OMOP_USER"
export OMOP_USER=$OMOP_USER
is_set_or_prompt "OMOP_PASSWORD"
export OMOP_PASSWORD=$OMOP_PASSWORD
is_set_or_prompt "OMOP_CDM_SCHEMA"
export OMOP_CDM_SCHEMA=$OMOP_CDM_SCHEMA
is_set_or_prompt "OMOP_RESULT_SCHEMA"
export OMOP_RESULT_SCHEMA=$OMOP_RESULT_SCHEMA

case "$DB_METHOD" in
"Docker-service")
# Code to execute if DB_METHOD is "docker"
Expand Down
6 changes: 3 additions & 3 deletions utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ print_outro(){
echo "before starting the vantage6-node."
echo ""
echo -e "\e[1;32mYou need to restart this machine before you can start the node.\e[0m"

echo -e "\e[1;32mMake sure that you can reach this machine after reboot!\e[0m"
print_divider
}

Expand Down Expand Up @@ -142,15 +142,15 @@ set_if_unset() {
local value="$2"

if [ -z "${!var_name}" ]; then
eval "$var_name=$value"
declare "$var_name=$value"
fi
}
is_set_or_prompt() {
local var_name="$1"

if ! is_set "$var_name"; then
echo -n " ? Please enter the value for $var_name: "; read -r VALUE
eval "$var_name=$VALUE"
declare "$var_name=$VALUE"
fi
}

Expand Down

0 comments on commit 0695949

Please sign in to comment.