2018-08-23 16:48:03 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -euo pipefail
|
|
|
|
|
2018-12-21 16:56:57 +00:00
|
|
|
if [[ ! -f "${CONF_PATH}/config.yaml" ]]; then
|
2018-09-07 20:46:08 +01:00
|
|
|
./uplink setup
|
|
|
|
fi
|
2018-08-23 16:48:03 +01:00
|
|
|
|
2018-09-07 20:46:08 +01:00
|
|
|
RUN_PARAMS="${RUN_PARAMS:-} --config ${CONF_PATH}"
|
|
|
|
|
2019-01-12 03:47:18 +00:00
|
|
|
if [[ -n "${API_KEY:-}" ]]; then
|
2018-09-07 20:46:08 +01:00
|
|
|
RUN_PARAMS="${RUN_PARAMS} --api-key ${API_KEY}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "${SATELLITE_ADDR:-}" ]; then
|
|
|
|
RUN_PARAMS="${RUN_PARAMS} --overlay-addr $SATELLITE_ADDR"
|
|
|
|
RUN_PARAMS="${RUN_PARAMS} --pointer-db-addr $SATELLITE_ADDR"
|
|
|
|
fi
|
|
|
|
|
|
|
|
exec ./uplink run $RUN_PARAMS "$@"
|