Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1#!/usr/bin/env bash2#3# bitcoind The bitcoin core server.4#5#6# chkconfig: 345 80 207# description: bitcoind8# processname: bitcoind9#11# Source function library.12. /etc/init.d/functions14# you can override defaults in /etc/sysconfig/bitcoind, see below15if [ -f /etc/sysconfig/bitcoind ]; then16. /etc/sysconfig/bitcoind17fi19RETVAL=021prog=bitcoind22# you can override the lockfile via BITCOIND_LOCKFILE in /etc/sysconfig/bitcoind23lockfile=${BITCOIND_LOCKFILE-/var/lock/subsys/bitcoind}25# bitcoind defaults to /usr/bin/bitcoind, override with BITCOIND_BIN26bitcoind=${BITCOIND_BIN-/usr/bin/bitcoind}28# bitcoind opts default to -disablewallet, override with BITCOIND_OPTS29bitcoind_opts=${BITCOIND_OPTS--disablewallet}31start() {32echo -n $"Starting $prog: "33daemon $DAEMONOPTS $bitcoind $bitcoind_opts34RETVAL=$?35echo36[ $RETVAL -eq 0 ] && touch $lockfile37return $RETVAL38}40stop() {41echo -n $"Stopping $prog: "42killproc $prog -t60043RETVAL=$?44echo45[ $RETVAL -eq 0 ] && rm -f $lockfile46return $RETVAL47}49case "$1" in50start)51start52;;53stop)54stop55;;56status)57status $prog58;;59restart)60stop61start62;;63*)64echo "Usage: service $prog {start|stop|status|restart}"65exit 166;;67esac
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.