## SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. ## ## SPDX-License-Identifier: AGPL-3.0-or-later [Unit] Description=Bitcoin daemon Documentation=https://github.com/bitcoin/bitcoin/blob/master/doc/init.md ConditionPathExists=/var/run/qubes-service/bitcoin-server ConditionPathExists=/usr/bin/bitcoind ConditionPathExists=/usr/bin/bitcoin-cli ConditionPathExists=/home/user/.bitcoin/bitcoin.conf After=qubes-sysinit.service After=network-online.target Wants=network-online.target [Service] PermissionsStartOnly=true Environment="MALLOC_ARENA_MAX=1" ExecStartPre=/bin/chgrp user /home/user/.bitcoin ExecStartPre=/usr/bin/bitcoin-dbcache ExecStart=/usr/bin/bitcoind \ -daemon=0 \ -conf=/home/user/.bitcoin/bitcoin.conf \ -startupnotify='systemd-notify --ready' \ -shutdownnotify='systemd-notify --stopping' ExecStop=/usr/bin/bitcoin-cli stop Type=notify NotifyAccess=all PIDFile=/run/bitcoind/bitcoind.pid Restart=on-failure TimeoutStartSec=infinity TimeoutStopSec=600 User=user Group=user RuntimeDirectory=bitcoind RuntimeDirectoryMode=0710 ConfigurationDirectory=bitcoin ConfigurationDirectoryMode=0710 StateDirectory=bitcoind StateDirectoryMode=0710 PrivateTmp=true ProtectSystem=full NoNewPrivileges=true PrivateDevices=true MemoryDenyWriteExecute=true [Install] WantedBy=multi-user.target