2018-07-19 20:42:50 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -euo pipefail
|
|
|
|
|
2021-05-13 11:36:21 +01:00
|
|
|
if [[ "${SETUP:-}" == "true" ]]
|
|
|
|
then
|
|
|
|
./storagenode setup --config-dir config --identity-dir identity
|
|
|
|
else
|
2019-04-23 16:51:04 +01:00
|
|
|
RUN_PARAMS="${RUN_PARAMS:-} --config-dir config"
|
|
|
|
RUN_PARAMS="${RUN_PARAMS:-} --identity-dir identity"
|
2021-05-13 11:36:21 +01:00
|
|
|
|
2019-04-23 16:51:04 +01:00
|
|
|
RUN_PARAMS="${RUN_PARAMS:-} --metrics.app-suffix=-alpha"
|
|
|
|
RUN_PARAMS="${RUN_PARAMS:-} --metrics.interval=30m"
|
2021-05-13 11:36:21 +01:00
|
|
|
RUN_PARAMS="${RUN_PARAMS:-} --contact.external-address=${ADDRESS}"
|
|
|
|
RUN_PARAMS="${RUN_PARAMS:-} --operator.email=${EMAIL}"
|
|
|
|
RUN_PARAMS="${RUN_PARAMS:-} --operator.wallet=${WALLET}"
|
2019-08-29 16:47:43 +01:00
|
|
|
RUN_PARAMS="${RUN_PARAMS:-} --console.address=:14002"
|
2021-05-13 11:36:21 +01:00
|
|
|
RUN_PARAMS="${RUN_PARAMS:-} --storage.allocated-disk-space=${STORAGE}"
|
2018-08-16 19:03:15 +01:00
|
|
|
|
2021-05-13 11:36:21 +01:00
|
|
|
exec ./storagenode run $RUN_PARAMS "$@"
|
|
|
|
fi
|