nixos/crowd: replace deprecated usage of PermissionsStartOnly

see https://github.com/NixOS/nixpkgs/issues/53852
This commit is contained in:
Aaron Andersen 2019-02-24 15:35:59 -05:00
parent 99f74c268b
commit 204be04531

View file

@ -117,6 +117,16 @@ in
users.groups."${cfg.group}" = {};
systemd.tmpfiles.rules = [
"d '${cfg.home}' - ${cfg.user} ${cfg.group} - -"
"d /run/atlassian-crowd - - - - -"
"L+ /run/atlassian-crowd/database - - - - ${cfg.home}/database"
"L+ /run/atlassian-crowd/logs - - - - ${cfg.home}/logs"
"L+ /run/atlassian-crowd/work - - - - ${cfg.home}/work"
"L+ /run/atlassian-crowd/server.xml - - - - ${cfg.home}/server.xml"
];
systemd.services.atlassian-crowd = {
description = "Atlassian Crowd";
@ -136,12 +146,6 @@ in
rm -rf ${cfg.home}/work
mkdir -p ${cfg.home}/{logs,database,work}
mkdir -p /run/atlassian-crowd
ln -sf ${cfg.home}/{database,logs,work,server.xml} /run/atlassian-crowd
chown ${cfg.user}:${cfg.group} ${cfg.home}
chown ${cfg.user}:${cfg.group} ${cfg.home}/{logs,database,work}
sed -e 's,port="8095",port="${toString cfg.listenPort}" address="${cfg.listenAddress}",' \
'' + (lib.optionalString cfg.proxy.enable ''
-e 's,compression="on",compression="off" protocol="HTTP/1.1" proxyName="${cfg.proxy.name}" proxyPort="${toString cfg.proxy.port}" scheme="${cfg.proxy.scheme}" secure="${boolToString cfg.proxy.secure}",' \
@ -153,7 +157,6 @@ in
User = cfg.user;
Group = cfg.group;
PrivateTmp = true;
PermissionsStartOnly = true;
ExecStart = "${pkg}/start_crowd.sh -fg";
};
};