Merge bitcoin/bitcoin#33044: contrib: drop use of PermissionsStartOnly & Group=

18d1071dd1 init: replace deprecated PermissionsStartOnly systemd directive (Florian Schmaus)
1caaf65043 init: remove Group= as it will default to the user's default group (Florian Schmaus)

Pull request description:

  > This removes the redundant 'Group=' directive and replaces the deprecated 'PermissionsStartOnly' directive.

  Picks up #16994 / #19513. The concern in both of these PRs was changing this too early, while systemd v240 was still prelevant on supported systems. That was ~5 years ago, and from what I can see, no modern/supported OS is still using an older systemd.

  Separately , I am wondering if we should move these files out to https://github.com/bitcoin-core/packaging/.

ACKs for top commit:
  willcl-ark:
    reACK 18d1071dd1

Tree-SHA512: a994e38099e68e8377ac820d3cd2047cbfca065ba617eff0d621e3c3b99b05bbd2329631aa8c885a83cf5d0066d97ff5be75bf5834e9f759d8f0d2c6c9b64851
This commit is contained in:
merge-script
2025-08-06 14:50:47 +01:00

View File

@@ -25,8 +25,7 @@ ExecStart=/usr/bin/bitcoind -pid=/run/bitcoind/bitcoind.pid \
-shutdownnotify='systemd-notify --stopping'
# Make sure the config directory is readable by the service user
PermissionsStartOnly=true
ExecStartPre=/bin/chgrp bitcoin /etc/bitcoin
ExecStartPre=!/bin/chgrp bitcoin /etc/bitcoin
# Process management
####################
@@ -44,7 +43,6 @@ TimeoutStopSec=600
# Run as bitcoin:bitcoin
User=bitcoin
Group=bitcoin
# /run/bitcoind
RuntimeDirectory=bitcoind