summarylogtreecommitdiffstats
path: root/bitcoin-reindex.service
diff options
context:
space:
mode:
Diffstat (limited to 'bitcoin-reindex.service')
-rw-r--r--bitcoin-reindex.service18
1 files changed, 18 insertions, 0 deletions
diff --git a/bitcoin-reindex.service b/bitcoin-reindex.service
new file mode 100644
index 00000000000..ca40c191e7c
--- /dev/null
+++ b/bitcoin-reindex.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Bitcoin Daemon (reindex)
+Conflicts=bitcoin.service
+After=network.target
+
+[Service]
+User=bitcoin
+Group=bitcoin
+ExecStart=/usr/bin/bitcoind -daemon=0 \
+ -conf=/etc/bitcoin/bitcoin.conf \
+ -datadir=/srv/bitcoin \
+ -reindex \
+ -pid=/run/bitcoind.pid
+ExecReload=/usr/bin/kill -HUP $MAINPID
+ExecStop=/usr/bin/bitcoind stop
+
+[Install]
+WantedBy=multi-user.target