Skip to content

Commit e5a0d3b

Browse files
committed
fix: start scripts mithril/network support
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent f2b3d9b commit e5a0d3b

File tree

3 files changed

+10
-28
lines changed

3 files changed

+10
-28
lines changed

bin/entrypoint

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,13 @@
22

33
set -e
44

5-
if [[ -n ${NETWORK} ]]; then
6-
exec /usr/local/bin/run-network ${@}
7-
fi
85
case ${1} in
96
run) exec /usr/local/bin/run-node ${@} ;;
107
cli) exec /usr/local/bin/run-client ${@} ;;
11-
*) echo "Nothing to do! Perhaps try [run|cli], or set NETWORK environment variable."; exit 1 ;;
128
esac
9+
if [[ -n ${NETWORK} ]]; then
10+
exec /usr/local/bin/run-network ${@}
11+
fi
1312

14-
# variables
15-
CARDANO_NETWORK=${CARDANO_NETWORK:-${NETWORK:-mainnet}}
16-
CARDANO_BLOCK_PRODUCER=${CARDANO_BLOCK_PRODUCER:-false}
17-
CARDANO_CONFIG=${CARDANO_CONFIG:-/opt/cardano/config/${CARDANO_NETWORK}/config.json}
18-
CARDANO_DATABASE_PATH=${CARDANO_DATABASE_PATH:-/opt/cardano/db}
19-
CARDANO_NODE_SOCKET_PATH=${CARDANO_NODE_SOCKET_PATH:-/opt/cardano/ipc/socket}
20-
CARDANO_PORT=${CARDANO_PORT:-3001}
21-
CARDANO_RTS_OPTS=${CARDANO_RTS_OPTS:--N2 -A64m -I0 -qg -qb --disable-delayed-os-memory-return}
22-
CARDANO_SHELLEY_KES_KEY=${CARDANO_SHELLEY_KES_KEY:-/opt/cardano/keys/kes.skey}
23-
CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE=${CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE:-/opt/cardano/keys/node.cert}
24-
CARDANO_SHELLEY_VRF_KEY=${CARDANO_SHELLEY_VRF_KEY:-/opt/cardano/keys/vrf.skey}
25-
CARDANO_SOCKET_PATH=${CARDANO_SOCKET_PATH:-/opt/cardano/ipc/socket}
26-
CARDANO_TOPOLOGY=${CARDANO_TOPOLOGY:-/opt/cardano/config/${CARDANO_NETWORK}/topology.json}
27-
28-
exec cardano-node \
29-
--config ${CARDANO_CONFIG} \
30-
--topology ${CARDANO_TOPOLOGY} \
31-
--database-path ${CARDANO_DATABASE_PATH} \
32-
--socket-path ${CARDANO_SOCKET_PATH} \
33-
--host-addr 0.0.0.0 \
34-
--port ${CARDANO_PORT}
13+
echo "Nothing to do! Perhaps try [run|cli], or set NETWORK environment variable."
14+
exit 1

bin/run-client

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#!/usr/bin/env bash
22

3-
shift
3+
if [[ ${1} == cli ]]; then
4+
shift
5+
fi
46
if [[ -n ${NETWORK} ]]; then
5-
export CARDANO_NODE_SOCKET_PATH=/ipc/node.socket
7+
export CARDANO_NODE_SOCKET_PATH=${CARDANO_NODE_SOCKET_PATH:-/ipc/node.socket}
68
else
79
export CARDANO_NODE_SOCKET_PATH=${CARDANO_NODE_SOCKET_PATH:-/opt/cardano/ipc/socket}
810
fi

bin/run-network

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ case ${NETWORK} in
1313
esac
1414

1515
# Mithril
16-
if ! test -e /data/db; then
16+
if ! test -e /data/db/protocolMagicId; then
1717
if [[ ${NETWORK} != preview ]]; then
1818
__base=https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration
1919
__url=${__base}/release-${NETWORK}

0 commit comments

Comments
 (0)