Skip to content

Commit

Permalink
Fix SSH_HOSTS environment variable to actually work
Browse files Browse the repository at this point in the history
This is fix provided in the following PR: debitoor#9
  • Loading branch information
Wojcirej committed Mar 21, 2024
1 parent e7880b1 commit a974b0c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ function indent() {

ENV_DIR=${3:-}
ssh_key="$(cat $ENV_DIR/SSH_KEY)"
ssh_hosts=${SSH_HOSTS:-"[email protected]"}
if [ -f $ENV_DIR/SSH_HOSTS ]; then
ssh_hosts="$(cat $ENV_DIR/SSH_HOSTS)"
echo "Available ssh hosts passed via SSH_HOSTS variable: $ssh_hosts"
else
ssh_hosts="[email protected]"
echo "SSH_HOSTS is not set, using default [email protected]"
fi

if [ "$ssh_key" != "" ]; then
echo "-----> Running SSH private key setup"
Expand Down

0 comments on commit a974b0c

Please sign in to comment.