init: replace deprecated PermissionsStartOnly systemd directive

PermissionsStartOnly is deprecated [1]. This removes the directives
and instead we prefixes the value of the ExecStartPre directive with
'!', which means the executable, 'chgrp' in this case, is run with
full privileges and able to change the group of /etc/bitcoin.

1: https://github.com/systemd/systemd/blob/60b45a80c1f98bad000bd902d97ecf6c4e3fc315/NEWS#L2434
This commit is contained in:
Florian Schmaus authored and fanquake committed 2025-08-01 14:41:07 +01:00
1 parent 1caaf65043
commit 18d1071dd1
1 file changed
+1 -2
+1 -2
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
####################