aboutsummaryrefslogtreecommitdiffstats
path: root/community/zabbix/zabbix-agentd.initd
diff options
context:
space:
mode:
authorKevin Daudt <kdaudt@alpinelinux.org>2019-10-16 19:56:49 +0000
committerKevin Daudt <kdaudt@alpinelinux.org>2019-10-17 04:42:46 +0000
commitda34f4ee33499acd17127a5dc173af535594dff5 (patch)
tree8f8d29810e7cb1c4bc8ad15be7e1b2db17b92bf9 /community/zabbix/zabbix-agentd.initd
parent0eca3830ae18af21271220a5aeae0a023eed640c (diff)
downloadaports-da34f4ee33499acd17127a5dc173af535594dff5.tar.bz2
aports-da34f4ee33499acd17127a5dc173af535594dff5.tar.xz
community/zabbix: modernize initd file
Use declarative style (no custom start/stop functions) and use a supervisor. Improve packaging by copying files / directories instead of moving them, making it easier to test packaging without having to rebuild everything. Move the zabbix agentd configuration file from the openrc package to the agent package where it belongs.
Diffstat (limited to 'community/zabbix/zabbix-agentd.initd')
-rw-r--r--community/zabbix/zabbix-agentd.initd34
1 files changed, 3 insertions, 31 deletions
diff --git a/community/zabbix/zabbix-agentd.initd b/community/zabbix/zabbix-agentd.initd
index 56d67db8ae..349b403d69 100644
--- a/community/zabbix/zabbix-agentd.initd
+++ b/community/zabbix/zabbix-agentd.initd
@@ -1,34 +1,6 @@
#!/sbin/openrc-run
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-agentd,v 1.1 2009/10/05 15:55:23 patrick Exp $
-
-# ensure the same file is specified as PidFile in /etc/zabbix/zabbix_agentd.conf
-pidfile=/var/run/zabbix/zabbix_agentd.pid
-user=zabbix
-group=zabbix
-
-start_pre() {
- checkpath --owner ${user}:${group} --directory ${pidfile%/*}
-}
-
-
-depend() {
- need net
- provide zabbix-agent
- use zabbix-server
-}
-
-start() {
- ebegin "Starting Zabbix agent"
- start-stop-daemon --pidfile ${pidfile} --start --user ${user}:${group} --exec /usr/sbin/zabbix_agentd
- eend $?
-}
-
-stop() {
- ebegin "Stopping Zabbix agent"
- start-stop-daemon --stop --user ${user} --pidfile ${pidfile}
- eend $?
-}
+command=/usr/sbin/zabbix_agentd
+command_args_foreground="-f"
+supervisor="supervise-daemon"