This repository was archived by the owner on Dec 20, 2024. It is now read-only.
forked from alexpeterson91/DAppNodePackage-Besu
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
·51 lines (48 loc) · 1.37 KB
/
entrypoint.sh
File metadata and controls
executable file
·51 lines (48 loc) · 1.37 KB
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
51
#!/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
# Print the jwt to the dappmanager
JWT=$(cat $JWT_PATH)
curl -X POST "http://my.dappnode/data-send?key=jwt&data=${JWT}"
exec besu --rpc-ws-host='0.0.0.0' \
--rpc-ws-enabled=$WS_ENABLED \
--rpc-http-host='0.0.0.0' \
--rpc-http-enabled=true \
--host-allowlist=* \
--rpc-http-cors-origins=* \
--engine-rpc-port=8551 \
--engine-host-allowlist=* \
--engine-jwt-secret=$JWT_PATH \
--engine-rpc-enabled=true \
--data-storage-format=$STORAGE_FORMAT \
--metrics-enabled \
--metrics-host='0.0.0.0' \
--data-path=/var/lib/besu \
--sync-mode=$SYNC_MODE \
--rpc-http-max-active-connections=$MAX_HTTP_CONNECTIONS \
--p2p-port=$P2P_PORT \
$EXTRA_OPTS