2018-07-29 12:21:52 +02:00
|
|
|
# RaspiBlitz: systemd unit for bitcoind
|
2021-05-25 13:30:50 -05:00
|
|
|
# edit final Wants/After when provision is done
|
|
|
|
Wants=network.target
|
|
|
|
After=network.target
|
2018-07-29 12:21:52 +02:00
|
|
|
|
|
|
|
[Unit]
|
2021-05-25 12:51:46 -05:00
|
|
|
Description=Bitcoin-Daemon
|
2018-07-29 12:21:52 +02:00
|
|
|
|
2021-05-25 12:49:10 -05:00
|
|
|
# for use with sendmail alert
|
2018-07-29 12:21:52 +02:00
|
|
|
#OnFailure=systemd-sendmail@%n
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
User=bitcoin
|
|
|
|
Group=bitcoin
|
|
|
|
Type=forking
|
2021-04-17 22:01:26 +02:00
|
|
|
PIDFile=/mnt/hdd/bitcoin/bitcoind.pid
|
2019-04-24 13:47:58 +02:00
|
|
|
ExecStartPre=-/home/admin/config.scripts/blitz.systemd.sh log blockchain STARTED
|
2021-05-25 11:34:34 -05:00
|
|
|
ExecStart=/usr/local/bin/bitcoind -daemon -conf=/mnt/hdd/bitcoin/bitcoin.conf -pid=/mnt/hdd/bitcoin/bitcoind.pid
|
2018-07-29 12:21:52 +02:00
|
|
|
Restart=always
|
|
|
|
TimeoutSec=120
|
|
|
|
RestartSec=30
|
2019-03-15 15:03:59 +01:00
|
|
|
StandardOutput=null
|
|
|
|
StandardError=journal
|
2018-07-29 12:21:52 +02:00
|
|
|
|
2021-06-02 09:18:29 +01:00
|
|
|
# Hardening measures
|
|
|
|
PrivateTmp=true
|
|
|
|
ProtectSystem=full
|
|
|
|
NoNewPrivileges=true
|
|
|
|
PrivateDevices=true
|
|
|
|
|
2018-07-29 12:21:52 +02:00
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|