aboutsummaryrefslogtreecommitdiffstats
path: root/main/zabbix/zabbix-agentd.initd
diff options
context:
space:
mode:
authorJohannes Matheis <jomat+alpinebuild@jmt.gr>2014-12-14 15:40:59 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-12-15 13:24:47 +0000
commit036db1cdefed97e2091c66c205cea451d9430f7b (patch)
tree7e5bf979a531badba870a36370972557c4f02c52 /main/zabbix/zabbix-agentd.initd
parenta3047a9041b59b786ff062ccdac90fed49ec96f0 (diff)
downloadaports-036db1cdefed97e2091c66c205cea451d9430f7b.tar.bz2
aports-036db1cdefed97e2091c66c205cea451d9430f7b.tar.xz
main/zabbix: respect agentd pid file in initd script
start-stop-daemon without an (empty) pid file refuses to start zabbix agentd if there is already one running inside a lxc container
Diffstat (limited to 'main/zabbix/zabbix-agentd.initd')
-rw-r--r--main/zabbix/zabbix-agentd.initd3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/zabbix/zabbix-agentd.initd b/main/zabbix/zabbix-agentd.initd
index 08e0ffcb38..29da8dd5af 100644
--- a/main/zabbix/zabbix-agentd.initd
+++ b/main/zabbix/zabbix-agentd.initd
@@ -3,6 +3,7 @@
# 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
@@ -20,7 +21,7 @@ depend() {
start() {
ebegin "Starting Zabbix agent"
- start-stop-daemon --start --user ${user}:${group} --exec /usr/sbin/zabbix_agentd
+ start-stop-daemon --pidfile ${pidfile} --start --user ${user}:${group} --exec /usr/sbin/zabbix_agentd
eend $?
}