X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mx0.jmt.gr (mx0.jmt.gr [91.143.91.66]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 3ED81DC00C6 for ; Sat, 6 Dec 2014 14:06:05 +0000 (UTC) Received: from localhost.int.greatnet.de (vpn.greatnet.de [83.133.84.12]) by mx0.jmt.gr (Postfix) with ESMTPSA id 63F005BD8; Sat, 6 Dec 2014 14:06:04 +0000 (UTC) From: Johannes Matheis To: alpine-devel@lists.alpinelinux.org Cc: Johannes Matheis Subject: [alpine-devel] [PATCH] main/zabbix: use pid file in zabbix agentd init script Date: Sat, 6 Dec 2014 14:05:59 +0000 Message-Id: <1417874759-18756-1-git-send-email-jomat+alpinebuild@jmt.gr> X-Mailer: git-send-email 2.0.0 X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- 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 ---