forked from nanexcool/dappnode-geth
-
Notifications
You must be signed in to change notification settings - Fork 16
/
entrypoint.sh
executable file
·50 lines (47 loc) · 1.19 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
44
45
46
47
48
49
50
#!/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"
;;
"teku.dnp.dappnode.eth")
echo "Using teku.dnp.dappnode.eth"
JWT_PATH="/security/teku/jwtsecret.hex"
;;
"lodestar.dnp.dappnode.eth")
echo "Using lodestar.dnp.dappnode.eth"
JWT_PATH="/security/lodestar/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
# Print the jwt to the dappmanager
JWT=$(cat $JWT_PATH)
curl -X POST "http://my.dappnode/data-send?key=jwt&data=${JWT}"
exec geth \
--http \
--http.addr 0.0.0.0 \
--http.corsdomain "*" \
--http.vhosts "*" \
--syncmode ${SYNCMODE:-snap} \
--ws \
--ws.origins "*" \
--ws.addr 0.0.0.0 \
--port ${P2P_PORT} \
--metrics \
--metrics.addr 0.0.0.0 \
--authrpc.addr 0.0.0.0 \
--authrpc.port 8551 \
--authrpc.vhosts "*" \
--authrpc.jwtsecret ${JWT_PATH} \
$EXTRA_OPTION