Skip to content

Commit

Permalink
fix(entrypoint): environment variables (#307) (#313)
Browse files Browse the repository at this point in the history
Co-authored-by: jcs47 <[email protected]>
  • Loading branch information
Talal Ashraf and jcs47 authored Jul 20, 2023
1 parent 3daa7da commit be295b6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,23 @@ export_mnemonic() {
EMPTY_STRING=""
PASSWORD="${PASSWORD:-$EMPTY_STRING}"
# gather user's args
ARGS=""
# set tofnd root. TOFND_HOME can be set to a different path by the user.
TOFND_HOME=${TOFND_HOME:-"./.tofnd"}
IMPORT_PATH=$TOFND_HOME/import
EXPORT_PATH=$TOFND_HOME/export
echo "Using tofnd root:" $TOFND_HOME
# gather user's args
# add '--no-password' and '--unsafe' flags to args if enabled
ARGS=${NOPASSWORD:+"${ARGS} --no-password"}
ARGS=${NOPASSWORD:+"--no-password"}
# add '--unsafe' flag to args if enabled
ARGS=${UNSAFE:+"${ARGS} --unsafe"}
ARGS+=${UNSAFE:+" --unsafe"}
# add '--address' flag to args if enabled
ARGS+=${ADDRESS:+" --address ${ADDRESS}"}
# add '--port' flag to args if enabled
ARGS+=${PORT:+" --port ${PORT}"}
# check mnemonic arg
if [ -n "${MNEMONIC_CMD}" ]; then \
Expand Down Expand Up @@ -110,7 +113,7 @@ if [ -n "${MNEMONIC_CMD}" ]; then \
esac
echo "Using existing mnemonic ..."
ARGS="${ARGS} -m existing"
ARGS+=" -m existing"
fi
# execute tofnd daemon
Expand Down

0 comments on commit be295b6

Please sign in to comment.