#!/bin/bash # Bash env file with host specific secrets LIBGLM_SECRETS_FILE=$LIBGLM_ROOT/.env.bash # Get the value of the specified variable in the secrets file. # $1 - the name of the secrets variable - (e.g. FOOBAR corresponds to LIBGLM_SECRET_FOOBAR in the file) function env_get_secret { source $LIBGLM_SECRETS_FILE local varname="LIBGLM_SECRET_$1" echo ${!varname} } # Fully qualified URL to the Gotify server. Should not end with a /. NOTIFY_URL="$(env_get_secret NOTIFY_URL)" # App token to use for the Gotify server. NOTIFY_TOKEN="$(env_get_secret NOTIFY_TOKEN)" # The current hostname LIBGLM_HOSTNAME=$(hostname)