~alpine/devel

main/zabbix: use pid file in zabbix agentd init script v1 PROPOSED

Johannes Matheis: 1
 main/zabbix: use pid file in zabbix agentd init script

 1 files changed, 12 insertions(+), 2 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.alpinelinux.org/~alpine/devel/patches/827/mbox | git am -3
Learn more about email & git

[alpine-devel] [PATCH] main/zabbix: use pid file in zabbix agentd init script Export this patch

---
 main/zabbix/zabbix-agentd.initd | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/main/zabbix/zabbix-agentd.initd b/main/zabbix/zabbix-agentd.initd
index 745b35e..08e0ffc 100644
--- a/main/zabbix/zabbix-agentd.initd
+++ b/main/zabbix/zabbix-agentd.initd
@@ -3,6 +3,15 @@
# 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 $

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
@@ -11,12 +20,13 @@ depend() {

start() {
	ebegin "Starting Zabbix agent"
	start-stop-daemon --start --user zabbix:zabbix --exec /usr/sbin/zabbix_agentd
	start-stop-daemon --start --user ${user}:${group} --exec /usr/sbin/zabbix_agentd
	eend $?
}

stop() {
	ebegin "Stopping Zabbix agent"
	start-stop-daemon  --stop --user zabbix --pidfile /var/run/zabbix/zabbix_agentd.pid
	start-stop-daemon  --stop --user ${user} --pidfile ${pidfile}
	eend $?
}

-- 
2.0.0



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---