diff options
Diffstat (limited to 'main/zabbix/zabbix-agentd.initd')
-rw-r--r-- | main/zabbix/zabbix-agentd.initd | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/main/zabbix/zabbix-agentd.initd b/main/zabbix/zabbix-agentd.initd index 745b35e06b..08e0ffcb38 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 $? } + |