mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/influxdb: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
This commit is contained in:
parent
6ac630bad3
commit
b1be2f1584
1 changed files with 6 additions and 7 deletions
|
@ -157,20 +157,19 @@ in
|
||||||
|
|
||||||
config = mkIf config.services.influxdb.enable {
|
config = mkIf config.services.influxdb.enable {
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d '${cfg.dataDir}' 0770 ${cfg.user} ${cfg.group} - -"
|
||||||
|
];
|
||||||
|
|
||||||
systemd.services.influxdb = {
|
systemd.services.influxdb = {
|
||||||
description = "InfluxDB Server";
|
description = "InfluxDB Server";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = ''${cfg.package}/bin/influxd -config "${configFile}"'';
|
ExecStart = ''${cfg.package}/bin/influxd -config "${configFile}"'';
|
||||||
User = "${cfg.user}";
|
User = cfg.user;
|
||||||
Group = "${cfg.group}";
|
Group = cfg.group;
|
||||||
PermissionsStartOnly = true;
|
|
||||||
};
|
};
|
||||||
preStart = ''
|
|
||||||
mkdir -m 0770 -p ${cfg.dataDir}
|
|
||||||
if [ "$(id -u)" = 0 ]; then chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}; fi
|
|
||||||
'';
|
|
||||||
postStart =
|
postStart =
|
||||||
let
|
let
|
||||||
scheme = if configOptions.http.https-enabled then "-k https" else "http";
|
scheme = if configOptions.http.https-enabled then "-k https" else "http";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue