Created
March 25, 2014 16:15
-
-
Save alainwolf/9765315 to your computer and use it in GitHub Desktop.
bitcoind Ubuntu Upstart Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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