Skip to content

contrib/init: (OpenRC) use -daemonwait to wait for startup completion

When other initscripts depend on bitcoind, it's because their daemons want to be able to invoke bitcoin-cli or to communicate with bitcoind via RPC. That can't happen until some time after bitcoind has forked into the background when it is started with the -daemon option. The -daemonwait option was added in 92cf3a22 (#21007) to address exactly this issue, so let's use it.

To avoid blocking startup for arbitrarily long, as users would be annoyed if agetty/display-manager doesn't start quickly, we now mark the bitcoind service initially as inactive at startup and then call back to OpenRC to mark the service as started (and proceed to start any dependent services) after bitcoind forks into the background.

This PR is a replacement for withdrawn PRs #22285 and #22354.

Merge request reports

Loading