- Add abcore.Dockerfile for geth-fork binary download from ABFoundationGlobal/abcore - Add scripts/init.sh for geth initialization with genesis.json and config.toml - Add generated compose file abcore-mainnet-geth-pruned-pebble-path.yml - Update compose_registry.json with new entry Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
23 lines
669 B
Bash
23 lines
669 B
Bash
#!/bin/sh
|
|
|
|
set -e # Exit on failure
|
|
|
|
GETH_DATA_DIR="/root/.ethereum"
|
|
CONFIG_FILE="/config/config.toml"
|
|
GENESIS_FILE="/config/genesis.json"
|
|
|
|
# Initialize geth from genesis if data directory is empty
|
|
if [ -z "$(ls -A "$GETH_DATA_DIR")" ]; then
|
|
echo "abcore: data directory is empty, initializing from genesis..."
|
|
if [ -f "$GENESIS_FILE" ]; then
|
|
/abcore/bin/geth init --datadir "$GETH_DATA_DIR" "$GENESIS_FILE"
|
|
else
|
|
echo "abcore: genesis file not found at $GENESIS_FILE" >&2
|
|
exit 1
|
|
fi
|
|
else
|
|
echo "abcore: data directory not empty, continuing..."
|
|
fi
|
|
|
|
exec /abcore/bin/geth --config "$CONFIG_FILE" --datadir "$GETH_DATA_DIR" "$@"
|