The script here in the official github repo
https://github.com/bitcoin/bitcoin/blob/0.13/contrib/init/bitcoind.service
looks like a systemd startupscript to me. However, it's from 2014.
Can I put this into my /etc/systemd/system directory as a bitcoind.service startscript and enable it? Or do I have to configure something extra?
This what the source code of the script looks like in Sept 2017:
[Unit]
Description=Bitcoin's distributed currency daemon
After=network.target
[Service]
User=bitcoin
Group=bitcoin
Type=forking
PIDFile=/var/lib/bitcoind/bitcoind.pid
ExecStart=/usr/bin/bitcoind -daemon -pid=/var/lib/bitcoind/bitcoind.pid \
-conf=/etc/bitcoin/bitcoin.conf -datadir=/var/lib/bitcoind -disablewallet
Restart=always
PrivateTmp=true
TimeoutStopSec=60s
TimeoutStartSec=2s
StartLimitInterval=120s
StartLimitBurst=5
[Install]
WantedBy=multi-user.target
The script mentions a config-file -conf=/etc/bitcoin/bitcoin.conf
- but I'm on Ubuntu/Debian, and the bitcoind package does not create a /etc/bitcoin/bitcoin.conf
file.
What should I put it in there? Or should I leave it empty?
(I've already read this related question: Newbie question, bitcoind installation doubte )
Ahh there is already a pull request from June 2017 discussing various topics:
https://github.com/bitcoin/bitcoin/pull/10529/files
They propose, for instance, to rename /etc/bitcoin
to /etc/bitcoind
, for consistency reasons.