summaryrefslogtreecommitdiff
path: root/net-analyzer/zabbix/files/3.0/init.d/zabbix-agentd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/zabbix/files/3.0/init.d/zabbix-agentd
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/zabbix/files/3.0/init.d/zabbix-agentd')
-rw-r--r--net-analyzer/zabbix/files/3.0/init.d/zabbix-agentd28
1 files changed, 28 insertions, 0 deletions
diff --git a/net-analyzer/zabbix/files/3.0/init.d/zabbix-agentd b/net-analyzer/zabbix/files/3.0/init.d/zabbix-agentd
new file mode 100644
index 000000000000..2e5024ed2de8
--- /dev/null
+++ b/net-analyzer/zabbix/files/3.0/init.d/zabbix-agentd
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+pid_file="/run/zabbix/zabbix_agentd.pid"
+
+depend() {
+ need net
+ provide zabbix-agent
+ use zabbix-server
+}
+
+start_pre() {
+ checkpath -d -m 0775 -o zabbix:zabbix /run/zabbix
+}
+
+start() {
+ ebegin "Starting Zabbix agent"
+ start-stop-daemon --start --pidfile ${pid_file} \
+ --user zabbix --group zabbix --exec /usr/sbin/zabbix_agentd -- -c /etc/zabbix/zabbix_agentd.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix agent"
+ start-stop-daemon --stop --pidfile ${pid_file}
+ eend $?
+}