nixos/influxdb: replace deprecated usage of PermissionsStartOnly

see https://github.com/NixOS/nixpkgs/issues/53852
This commit is contained in:
Aaron Andersen 2019-03-17 21:37:45 -04:00
parent 6ac630bad3
commit b1be2f1584

View File

@ -157,20 +157,19 @@ in
config = mkIf config.services.influxdb.enable {
systemd.tmpfiles.rules = [
"d '${cfg.dataDir}' 0770 ${cfg.user} ${cfg.group} - -"
];
systemd.services.influxdb = {
description = "InfluxDB Server";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
ExecStart = ''${cfg.package}/bin/influxd -config "${configFile}"'';
User = "${cfg.user}";
Group = "${cfg.group}";
PermissionsStartOnly = true;
User = cfg.user;
Group = cfg.group;
};
preStart = ''
mkdir -m 0770 -p ${cfg.dataDir}
if [ "$(id -u)" = 0 ]; then chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}; fi
'';
postStart =
let
scheme = if configOptions.http.https-enabled then "-k https" else "http";