-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathentrypoint.sh
executable file
·43 lines (39 loc) · 1.06 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
case "$_DAPPNODE_GLOBAL_CONSENSUS_CLIENT_MAINNET" in
"prysm.dnp.dappnode.eth")
echo "Using prysm.dnp.dappnode.eth"
JWT_PATH="/security/prysm/jwtsecret.hex"
;;
"lighthouse.dnp.dappnode.eth")
echo "Using lighthouse.dnp.dappnode.eth"
JWT_PATH="/security/lighthouse/jwtsecret.hex"
;;
"lodestar.dnp.dappnode.eth")
echo "Using lodestar.dnp.dappnode.eth"
JWT_PATH="/security/lodestar/jwtsecret.hex"
;;
"teku.dnp.dappnode.eth")
echo "Using teku.dnp.dappnode.eth"
JWT_PATH="/security/teku/jwtsecret.hex"
;;
"nimbus.dnp.dappnode.eth")
echo "Using nimbus.dnp.dappnode.eth"
JWT_PATH="/security/nimbus/jwtsecret.hex"
;;
*)
echo "Using default"
JWT_PATH="/security/default/jwtsecret.hex"
;;
esac
apt update
apt install -y curl
# Print the jwt to the dappmanager
JWT=$(cat $JWT_PATH)
curl -X POST "http://my.dappnode/data-send?key=jwt&data=${JWT}"
exec /nethermind/nethermind \
--JsonRpc.Enabled=true \
--JsonRpc.JwtSecretFile=${JWT_PATH} \
--Init.BaseDbPath=/data \
--HealthChecks.Enabled true \
--Init.LogDirectory=/data/logs \
$EXTRA_OPTS