mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 04:33:57 +00:00
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 <aszlig@redmoonstudios.org>
This commit is contained in:
parent
62d5282602
commit
3bf1210635
@ -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
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user