summaryrefslogtreecommitdiff
path: root/net-analyzer/zabbix/files/zabbix-server-r1.init
blob: 1652ba782fa845f57779ea9b7b3130695ce26c8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
}