stack_2019Full Member
Posts: 107 · Reputation: 674
#1Jul 19, 2020, 09:54 AM
So I've got an opensuse leap 15.5 setup with KDE and bitcoin core 26.0 installed at /usr/local/bin/bitcoind (permissions are -rwxr-xr-x owned by root). My bitcoin data directory is /home/bitcoin/.bitcoin which is a symlink pointing to an external drive at /run/media/ibm/BB/BTCbc/ (permissions are drwxrwx owned by bitcoin).
I log in as user ibm, who is in the bitcoin group, and I can run bitcoind and bitcoin-qt without any issues.
Now, I'm trying to get this node to run as a service at boot.
Here’s what my service unit file looks like at /etc/systemd/system/bitcoind.service (permissions are -rwxr r owned by root):
[Unit]
Description=Bitcoin daemon
Documentation=https://github.com/bitcoin/bitcoin/blob/master/doc/init.md
ExecStart=/usr/local/bin/bitcoind -daemon \
-pid=/home/bitcoin/.bitcoin/bitcoind.pid \
-conf=/home/bitcoin/.bitcoin/bitcoin.conf \
-datadir=/home/bitcoin/.bitcoin \
-startupnotify='systemd-notify ready' \
-shutdownnotify='systemd-notify stopping'
ExecStop=/usr/local/bin/bitcoin-cli -datadir=/home/bitcoin/.bitcoin stop
PermissionsStartOnly=true
ExecStartPre=/bin/chgrp bitcoin /home/bitcoin/.bitcoin
Type=notify
NotifyAccess=all
PIDFile=/home/bitcoin/.bitcoin/bitcoind.pid
Restart=on-failure
TimeoutStartSec=infinity
TimeoutStopSec=600
User=