From: Marcin Krol Date: Mon, 4 Jan 2021 22:14:40 +0000 (+0100) Subject: - fix sql commands X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=228f0620b13ac9924232fa515b0b1cf46e861834;p=packages%2Fzabbix.git - fix sql commands --- diff --git a/zabbix.spec b/zabbix.spec index 6493744..577c175 100644 --- a/zabbix.spec +++ b/zabbix.spec @@ -15,7 +15,7 @@ Summary: Zabbix - network monitoring software Summary(pl.UTF-8): Zabbix - oprogramowanie do monitorowania sieci Name: zabbix Version: 5.0.7 -Release: 0.2 +Release: 0.3 License: GPL v2+ Group: Networking/Utilities Source0: https://cdn.zabbix.com/zabbix/sources/stable/5.0/%{name}-%{version}.tar.gz @@ -388,6 +388,7 @@ if [ "$1" = 1 ]; then You should create database for Zabbix. Running these should be fine in most cases: + mysqladmin create zabbix zcat %{_docdir}/%{name}-server-mysql-%{version}/schema.sql.gz | mysql zabbix zcat %{_docdir}/%{name}-server-mysql-%{version}/images.sql.gz | mysql zabbix @@ -403,11 +404,11 @@ if [ "$1" = 1 ]; then Running these should be fine in most cases: - createuser zabbix - createdb -O zabbix zabbix - zcat %{_docdir}/%{name}-server-postgresql-%{version}/schema.sql.gz | psql -u zabbix zabbix - zcat %{_docdir}/%{name}-server-postgresql-%{version}/images.sql.gz | psql -u zabbix zabbix - zcat %{_docdir}/%{name}-server-postgresql-%{version}/data.sql.gz | psql -u zabbix zabbix + createuser -U postgres zabbix + createdb -U postgres -O zabbix zabbix + zcat %{_docdir}/%{name}-server-postgresql-%{version}/schema.sql.gz | psql -U zabbix zabbix + zcat %{_docdir}/%{name}-server-postgresql-%{version}/images.sql.gz | psql -U zabbix zabbix + zcat %{_docdir}/%{name}-server-postgresql-%{version}/data.sql.gz | psql -U zabbix zabbix EOF fi ln -sf %{_sbindir}/zabbix_server-postgresql %{_sbindir}/zabbix_server || :