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)} cfg.collectors)}
''; '';
cmdLineOpts = concatStringsSep " " (
[ "-h=${cfg.bosunHost}" "-c=${collectors}" ] ++ cfg.extraOpts
);
in { in {
options = { 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; PermissionsStartOnly = true;
User = cfg.user; User = cfg.user;
Group = cfg.group; Group = cfg.group;
ExecStart = '' ExecStart = "${cfg.package}/bin/scollector ${cmdLineOpts}";
${cfg.package}/bin/scollector -h=${cfg.bosunHost} -c=${collectors}
'';
}; };
}; };