Skip to content

Instantly share code, notes, and snippets.

@alainwolf
Created March 25, 2014 16:15
Show Gist options
  • Save alainwolf/9765315 to your computer and use it in GitHub Desktop.
Save alainwolf/9765315 to your computer and use it in GitHub Desktop.
bitcoind Ubuntu Upstart Configuration
# bitcoind - Bitcoin core daemon
#
# Ubuntu upstart service configuration for
# Bitcoin Core Network Node.
description "Bitcoin Core daemon"
author "Alain Wolf"
# Start after network and filesystem
start on filesystem and static-network-up
stop on runlevel [016]
# Allow upto 5 minutes shutdown-time
kill timeout 300
respawn
respawn limit 5 30
console log
nice 15
setuid bitcoin
setgid bitcoin
expect fork
env pidfile=/var/lib/bitcoin/bitcoind.pid
env conf=/etc/bitcoin/bitcoind.conf
env datadir=/var/lib/bitcoin
exec \
start-stop-daemon --start \
--pidfile $pidfile \
--exec /usr/bin/bitcoind \
-- \
-conf=$conf \
-pid=$pidfile \
-datadir=$datadir \
-daemon
pre-stop exec \
/usr/bin/bitcoin-cli -conf=$conf -datadir=$datadir stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment