mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
nixos/firebird: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
This commit is contained in:
parent
4775c59528
commit
8034dac42f
|
@ -95,6 +95,11 @@ in
|
|||
|
||||
environment.systemPackages = [cfg.package];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${dataDir}' 0700 ${cfg.user} - - -"
|
||||
"d '${systemDir}' 0700 ${cfg.user} - - -"
|
||||
];
|
||||
|
||||
systemd.services.firebird =
|
||||
{ description = "Firebird Super-Server";
|
||||
|
||||
|
@ -104,21 +109,16 @@ in
|
|||
# is a better way
|
||||
preStart =
|
||||
''
|
||||
mkdir -m 0700 -p \
|
||||
"${dataDir}" \
|
||||
"${systemDir}" \
|
||||
/var/log/firebird
|
||||
|
||||
if ! test -e "${systemDir}/security2.fdb"; then
|
||||
cp ${firebird}/security2.fdb "${systemDir}"
|
||||
fi
|
||||
|
||||
chown -R ${cfg.user} "${dataDir}" "${systemDir}" /var/log/firebird
|
||||
chmod -R 700 "${dataDir}" "${systemDir}" /var/log/firebird
|
||||
'';
|
||||
|
||||
serviceConfig.PermissionsStartOnly = true; # preStart must be run as root
|
||||
serviceConfig.User = cfg.user;
|
||||
serviceConfig.LogsDirectory = "firebird";
|
||||
serviceConfig.LogsDirectoryMode = "0700";
|
||||
serviceConfig.ExecStart = ''${firebird}/bin/fbserver -d'';
|
||||
|
||||
# TODO think about shutdown
|
||||
|
|
Loading…
Reference in a new issue