mirror of
https://github.com/ben-grande/qusal.git
synced 2024-12-15 02:44:31 -05:00
49 lines
1.3 KiB
SYSTEMD
49 lines
1.3 KiB
SYSTEMD
|
## SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||
|
##
|
||
|
## 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
|