Improve CLI and daemon lifecycle usability

This commit is contained in:
Eric Wendland 2026-07-18 15:23:20 +02:00
commit f61cb44dad
14 changed files with 1028 additions and 204 deletions

View file

@ -18,12 +18,11 @@ export GETH_HOME="${GETH_HOME:-$HOME/.local/share/geth/geth}"
geth init
geth daemon run >"$GETH_HOME/daemon.log" 2>&1 &
daemon_pid=$!
trap 'kill "$daemon_pid" 2>/dev/null || true' EXIT
geth wait daemon --timeout-ms 30000
geth doctor --json
geth status --json
trap 'kill "$daemon_pid" 2>/dev/null || true' EXIT
```
Create a backup into a separate directory and validate that it can restore to a
@ -106,13 +105,17 @@ manager mutation:
```sh
geth daemon service print
geth daemon service install --start
geth daemon install
geth wait daemon --timeout-ms 30000
geth daemon service status
geth daemon service stop
geth daemon service uninstall
geth daemon status
geth daemon stop
geth daemon uninstall
```
For a disposable interactive test, `geth daemon run --ephemeral` creates and
prints a temporary home. Other commands can target it explicitly with `geth
--home <printed-path> ...`; normal Ctrl-C shutdown removes the state.
Admin SSH keys remain outside geth state. Automation should pass public admin
keys with `--admin-key` and use the matching private key only as an argument to
the explicit signing command when an admin operation is intended: