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:
parent
bf28d5c109
commit
8990470951
@ -11,10 +11,11 @@ let
|
|||||||
# we could generate zabbix.conf.php declaratively.
|
# we could generate zabbix.conf.php declaratively.
|
||||||
zabbixPHP = pkgs.runCommand "${pkgs.zabbix.server.name}-php" {}
|
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
|
chmod -R u+w $out
|
||||||
#rm -rf $out/conf
|
ln -s "${if config.configFile == null
|
||||||
ln -s ${config.stateDir}/zabbix.conf.php $out/conf/zabbix.conf.php
|
then "${config.stateDir}/zabbix.conf.php"
|
||||||
|
else config.configFile}" "$out/conf/zabbix.conf.php"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in
|
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 {
|
stateDir = pkgs.lib.mkOption {
|
||||||
default = "/var/lib/zabbix/frontend";
|
default = "/var/lib/zabbix/frontend";
|
||||||
description = "
|
description = "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user