scollector module: Add extraOpts option

This commit is contained in:
Rickard Nilsson 2015-03-18 21:16:23 +01:00
parent e8892b3ba5
commit bdbdaee3c0

View file

@ -20,6 +20,10 @@ let
cfg.collectors)}
'';
cmdLineOpts = concatStringsSep " " (
[ "-h=${cfg.bosunHost}" "-c=${collectors}" ] ++ cfg.extraOpts
);
in {
options = {
@ -79,6 +83,15 @@ in {
'';
};
extraOpts = mkOption {
type = with types; listOf str;
default = [];
example = [ "-d" ];
description = ''
Extra scollector command line options
'';
};
};
};
@ -95,9 +108,7 @@ in {
PermissionsStartOnly = true;
User = cfg.user;
Group = cfg.group;
ExecStart = ''
${cfg.package}/bin/scollector -h=${cfg.bosunHost} -c=${collectors}
'';
ExecStart = "${cfg.package}/bin/scollector ${cmdLineOpts}";
};
};