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: 60b45a80c1/NEWS (L2434)
This commit is contained in:
Florian Schmaus 2020-07-14 10:48:54 +02:00 committed by fanquake
parent 1caaf65043
commit 18d1071dd1
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

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
####################