From 3bf12106352c86773fc31d4a10a7c58ef39c3f14 Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 13 Jun 2013 03:29:29 +0200 Subject: [PATCH] zabbix-server: Swap order of database population. Starting with Zabbix 2.0 the order of data imports is important[*] and will lead to errors if not done in the right order. Zabbix 1.8 works fine with the swapped order as well, so this change shouldn't affect any pre-2.0 users. [*] https://www.zabbix.com/documentation/2.0/manual/appendix/install/db_scripts Signed-off-by: aszlig --- modules/services/monitoring/zabbix-server.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/services/monitoring/zabbix-server.nix b/modules/services/monitoring/zabbix-server.nix index 60c1f914fb78..6735b4ca3279 100644 --- a/modules/services/monitoring/zabbix-server.nix +++ b/modules/services/monitoring/zabbix-server.nix @@ -93,8 +93,8 @@ in ${pkgs.postgresql}/bin/createuser --no-superuser --no-createdb --no-createrole zabbix || true ${pkgs.postgresql}/bin/createdb --owner zabbix zabbix || true cat ${pkgs.zabbix.server}/share/zabbix/db/schema/postgresql.sql | ${pkgs.su}/bin/su -s "$SHELL" zabbix -c '${pkgs.postgresql}/bin/psql zabbix' - cat ${pkgs.zabbix.server}/share/zabbix/db/data/data.sql | ${pkgs.su}/bin/su -s "$SHELL" zabbix -c '${pkgs.postgresql}/bin/psql zabbix' cat ${pkgs.zabbix.server}/share/zabbix/db/data/images_pgsql.sql | ${pkgs.su}/bin/su -s "$SHELL" zabbix -c '${pkgs.postgresql}/bin/psql zabbix' + cat ${pkgs.zabbix.server}/share/zabbix/db/data/data.sql | ${pkgs.su}/bin/su -s "$SHELL" zabbix -c '${pkgs.postgresql}/bin/psql zabbix' touch "${libDir}/db-created" fi '';