- Use canonical clients version substitution format:
${SERVICE_CLIENT_VERSION:-version} instead of ${SERVICE_GETH_VERSION:-version}
- Change profile from pruned-pebble-path to pruned-pebble-hash
- Remove --state.scheme=path from run command (geth v1.13 cannot write path scheme)
- Remove --state.scheme=path from init.sh geth init command
- Keep --db.engine=pebble and --config=/config/config.toml
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
23 lines
688 B
Bash
23 lines
688 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" --db.engine=pebble "$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" "$@"
|