diff options
author | Belhassen Dahmen <belhassen.dahmen@adjust.com> | 2021-04-20 17:40:34 +0200 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2021-11-17 09:08:29 +0100 |
commit | 9534f7c3279f6b8808c3e002e5f205217e66f535 (patch) | |
tree | 3d42db9f0db0c17ece530c74ecd515f8df434537 /net-analyzer/zabbix | |
parent | profiles/arch/hppa: stable-mask dev-python/matplotlib[gtk3] (diff) | |
download | gentoo-9534f7c3279f6b8808c3e002e5f205217e66f535.tar.gz gentoo-9534f7c3279f6b8808c3e002e5f205217e66f535.tar.bz2 gentoo-9534f7c3279f6b8808c3e002e5f205217e66f535.zip |
net-analyzer/zabbix add reload() to zabbix-server init script
As zabbix-server process supports configuration reload in runtime, it
would be great to support with through the openrc commandline utility.
Bug: https://bugs.gentoo.org/824138
Signed-off-by: Belhassen Dahmen <zegeek94@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/20473
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'net-analyzer/zabbix')
-rw-r--r-- | net-analyzer/zabbix/files/zabbix-server-r1.init | 25 | ||||
-rw-r--r-- | net-analyzer/zabbix/zabbix-5.4.7-r1.ebuild (renamed from net-analyzer/zabbix/zabbix-5.4.7.ebuild) | 2 |
2 files changed, 26 insertions, 1 deletions
diff --git a/net-analyzer/zabbix/files/zabbix-server-r1.init b/net-analyzer/zabbix/files/zabbix-server-r1.init new file mode 100644 index 000000000000..1652ba782fa8 --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-server-r1.init @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/zabbix_server" +command_args="--foreground --config /etc/zabbix/zabbix_server.conf" +command_background="true" +command_user="zabbix:zabbix" +pidfile="/run/${RC_SVCNAME}.pid" + +depend() { + need net + use mysql postgresql +} + +start_pre() { + checkpath -q -d -m 0750 -o root:zabbix /etc/zabbix + checkpath -q -f -m 0640 -o root:zabbix /etc/zabbix/*.conf +} + +reload() { + /usr/sbin/zabbix_server \ + -c /etc/zabbix/zabbix_server.conf \ + -R config_cache_reload +} diff --git a/net-analyzer/zabbix/zabbix-5.4.7.ebuild b/net-analyzer/zabbix/zabbix-5.4.7-r1.ebuild index f1795467d2f7..014d630c3a5c 100644 --- a/net-analyzer/zabbix/zabbix-5.4.7.ebuild +++ b/net-analyzer/zabbix/zabbix-5.4.7-r1.ebuild @@ -432,7 +432,7 @@ src_install() { fperms 0640 /etc/zabbix/zabbix_server.conf fowners root:zabbix /etc/zabbix/zabbix_server.conf - newinitd "${FILESDIR}"/zabbix-server.init zabbix-server + newinitd "${FILESDIR}"/zabbix-server-r1.init zabbix-server dosbin src/zabbix_server/zabbix_server |