2018-08-23 16:48:03 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -euo pipefail
|
|
|
|
|
2018-09-07 20:46:08 +01:00
|
|
|
if [[ ! -f "${CONF_PATH}" ]]; then
|
|
|
|
./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}"
|
|
|
|
|
|
|
|
if [[ -n "${API_KEY}" ]]; then
|
|
|
|
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 "$@"
|