apache-httpd/zabbix: Allow custom configFile.

If option is left by its default value, behaviour is the same as before, using
the configuration file created by the web interface.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2013-06-13 02:28:23 +02:00
parent bf28d5c109
commit 8990470951
No known key found for this signature in database
GPG Key ID: D0EBD0EC8C2DC961

View File

@ -11,10 +11,11 @@ let
# we could generate zabbix.conf.php declaratively.
zabbixPHP = pkgs.runCommand "${pkgs.zabbix.server.name}-php" {}
''
cp -rs ${pkgs.zabbix.server}/share/zabbix/php $out
cp -rs ${pkgs.zabbix.server}/share/zabbix/php "$out"
chmod -R u+w $out
#rm -rf $out/conf
ln -s ${config.stateDir}/zabbix.conf.php $out/conf/zabbix.conf.php
ln -s "${if config.configFile == null
then "${config.stateDir}/zabbix.conf.php"
else config.configFile}" "$out/conf/zabbix.conf.php"
'';
in
@ -57,6 +58,16 @@ in
";
};
configFile = pkgs.lib.mkOption {
default = null;
type = with pkgs.lib.types; nullOr path;
description = ''
The configuration file (zabbix.conf.php) which contains the database
connection settings. If not set, the configuration settings will created
by the web installer.
'';
};
stateDir = pkgs.lib.mkOption {
default = "/var/lib/zabbix/frontend";
description = "