mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 11:50:06 +00:00
nixos/traefik: replace bash wrapper in ExecStartPre
This commit is contained in:
@@ -130,12 +130,9 @@ in
|
||||
startLimitBurst = 5;
|
||||
serviceConfig = {
|
||||
EnvironmentFile = cfg.environmentFiles;
|
||||
ExecStartPre = lib.optional (cfg.environmentFiles != [ ]) (
|
||||
pkgs.writeShellScript "pre-start" ''
|
||||
umask 077
|
||||
${pkgs.envsubst}/bin/envsubst -i "${staticConfigFile}" > "${finalStaticConfigFile}"
|
||||
''
|
||||
);
|
||||
ExecStartPre = lib.optional (
|
||||
cfg.environmentFiles != [ ]
|
||||
) "${pkgs.envsubst}/bin/envsubst -i '${staticConfigFile}' -o '${finalStaticConfigFile}'";
|
||||
ExecStart = "${cfg.package}/bin/traefik --configfile=${finalStaticConfigFile}";
|
||||
Type = "simple";
|
||||
User = "traefik";
|
||||
@@ -152,6 +149,7 @@ in
|
||||
ProtectSystem = "full";
|
||||
ReadWritePaths = [ cfg.dataDir ];
|
||||
RuntimeDirectory = "traefik";
|
||||
RuntimeDirectoryMode = "0700";
|
||||
WorkingDirectory = cfg.dataDir;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user