mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-27 02:34:53 +00:00
nixos/mqtt2influxdb: replace systemd preStart with ExecStartPre
This commit is contained in:
@@ -236,14 +236,12 @@ in
|
||||
description = "BigClown MQTT to InfluxDB bridge";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = lib.mkIf config.services.mosquitto.enable [ "mosquitto.service" ];
|
||||
preStart = ''
|
||||
umask 077
|
||||
${pkgs.envsubst}/bin/envsubst -i "${configFile}" -o "${finalConfig}"
|
||||
'';
|
||||
serviceConfig = {
|
||||
EnvironmentFile = cfg.environmentFiles;
|
||||
ExecStartPre = lib.mkIf envConfig "${pkgs.envsubst}/bin/envsubst -i '${configFile}' -o \"${finalConfig}\"";
|
||||
ExecStart = "${lib.getExe cfg.package} -dc ${finalConfig}";
|
||||
RuntimeDirectory = "mqtt2influxdb";
|
||||
RuntimeDirectoryMode = "0700";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user