aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/zabbix2-server
diff options
context:
space:
mode:
authorTorsten Zuehlsdorff <tz@FreeBSD.org>2016-09-01 09:44:43 +0000
committerTorsten Zuehlsdorff <tz@FreeBSD.org>2016-09-01 09:44:43 +0000
commitb2293ba5033919c07b2bafcecdb9063825debb9f (patch)
tree2f28191706162f57b0da5ec0fb302682abba70fa /net-mgmt/zabbix2-server
parent981f475d58a850adfb0ae4f3d6c9d73de01b1f06 (diff)
downloadports-b2293ba5033919c07b2bafcecdb9063825debb9f.tar.gz
ports-b2293ba5033919c07b2bafcecdb9063825debb9f.zip
Notes
Diffstat (limited to 'net-mgmt/zabbix2-server')
-rw-r--r--net-mgmt/zabbix2-server/Makefile11
-rw-r--r--net-mgmt/zabbix2-server/distinfo5
-rw-r--r--net-mgmt/zabbix2-server/files/patch-src_zabbix__agent_zabbix__agentd.c11
-rw-r--r--net-mgmt/zabbix2-server/files/patch-src_zabbix__proxy_proxy.c11
-rw-r--r--net-mgmt/zabbix2-server/files/patch-src_zabbix__server_server.c11
-rw-r--r--net-mgmt/zabbix2-server/files/zabbix_agentd.in27
-rw-r--r--net-mgmt/zabbix2-server/files/zabbix_proxy.in32
-rw-r--r--net-mgmt/zabbix2-server/files/zabbix_server.in33
8 files changed, 95 insertions, 46 deletions
diff --git a/net-mgmt/zabbix2-server/Makefile b/net-mgmt/zabbix2-server/Makefile
index 492203ff55d7..ef28e5eaeb45 100644
--- a/net-mgmt/zabbix2-server/Makefile
+++ b/net-mgmt/zabbix2-server/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= zabbix2
-PORTVERSION= 2.0.17
+PORTVERSION= 2.0.18
PORTREVISION?= 0
CATEGORIES= net-mgmt
MASTER_SITES= SF/zabbix/ZABBIX%20Latest%20Stable/${PORTVERSION}
@@ -14,9 +14,13 @@ COMMENT= Enterprise-class open source distributed monitoring (${PKGNAMESUFFIX:S/
LICENSE= GPLv2
-CONFLICTS= ${PKGBASE}-1.[0-8]*
+LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp
+
+LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp
-IGNORE_WITH_MYSQL= 41
+LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp
+
+CONFLICTS= ${PKGBASE}-1.[0-8]*
.if ${PKGNAMESUFFIX} != "-agent"
CONFLICTS+= ${PORTNAME}-1.[0-8]*
@@ -58,7 +62,6 @@ CONFIGURE_ARGS+= --enable-${ZABBIX_BUILD} \
--datadir=${ETCDIR}
.if ${ZABBIX_BUILD} != "agent"
-LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp
USES+= execinfo
CPPFLAGS+= ${EXECINFO_CPPFLAGS}
diff --git a/net-mgmt/zabbix2-server/distinfo b/net-mgmt/zabbix2-server/distinfo
index 1af3c0d92f8f..ecc3af029b8c 100644
--- a/net-mgmt/zabbix2-server/distinfo
+++ b/net-mgmt/zabbix2-server/distinfo
@@ -1,2 +1,3 @@
-SHA256 (zabbix-2.0.17.tar.gz) = 0cab75a73473eefbdaeeb8984e7cab8dc60c4d1daa9fe9750a9c08994e629f59
-SIZE (zabbix-2.0.17.tar.gz) = 13962665
+TIMESTAMP = 1472720412
+SHA256 (zabbix-2.0.18.tar.gz) = 4b81406ad25d83a4922177afc2f6cd558ec759df7015161ceb2090c9d6ace4ae
+SIZE (zabbix-2.0.18.tar.gz) = 13958980
diff --git a/net-mgmt/zabbix2-server/files/patch-src_zabbix__agent_zabbix__agentd.c b/net-mgmt/zabbix2-server/files/patch-src_zabbix__agent_zabbix__agentd.c
new file mode 100644
index 000000000000..7190b179a6be
--- /dev/null
+++ b/net-mgmt/zabbix2-server/files/patch-src_zabbix__agent_zabbix__agentd.c
@@ -0,0 +1,11 @@
+--- src/zabbix_agent/zabbix_agentd.c.orig 2016-09-01 07:20:23 UTC
++++ src/zabbix_agent/zabbix_agentd.c
+@@ -249,7 +249,7 @@ static void set_defaults()
+
+ #ifdef USE_PID_FILE
+ if (NULL == CONFIG_PID_FILE)
+- CONFIG_PID_FILE = "/tmp/zabbix_agentd.pid";
++ CONFIG_PID_FILE = "/var/run/zabbix/zabbix_agentd.pid";
+ #endif
+
+ }
diff --git a/net-mgmt/zabbix2-server/files/patch-src_zabbix__proxy_proxy.c b/net-mgmt/zabbix2-server/files/patch-src_zabbix__proxy_proxy.c
new file mode 100644
index 000000000000..07159879b7d0
--- /dev/null
+++ b/net-mgmt/zabbix2-server/files/patch-src_zabbix__proxy_proxy.c
@@ -0,0 +1,11 @@
+--- src/zabbix_proxy/proxy.c.orig 2016-09-01 07:20:44 UTC
++++ src/zabbix_proxy/proxy.c
+@@ -238,7 +238,7 @@ static void zbx_set_defaults()
+ CONFIG_SNMPTRAP_FILE = zbx_strdup(CONFIG_SNMPTRAP_FILE, "/tmp/zabbix_traps.tmp");
+
+ if (NULL == CONFIG_PID_FILE)
+- CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/tmp/zabbix_proxy.pid");
++ CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/var/run/zabbix/zabbix_proxy.pid");
+
+ if (NULL == CONFIG_TMPDIR)
+ CONFIG_TMPDIR = zbx_strdup(CONFIG_TMPDIR, "/tmp");
diff --git a/net-mgmt/zabbix2-server/files/patch-src_zabbix__server_server.c b/net-mgmt/zabbix2-server/files/patch-src_zabbix__server_server.c
new file mode 100644
index 000000000000..662f9a9abc85
--- /dev/null
+++ b/net-mgmt/zabbix2-server/files/patch-src_zabbix__server_server.c
@@ -0,0 +1,11 @@
+--- src/zabbix_server/server.c.orig 2016-09-01 07:22:52 UTC
++++ src/zabbix_server/server.c
+@@ -207,7 +207,7 @@ static void zbx_set_defaults()
+ CONFIG_SNMPTRAP_FILE = zbx_strdup(CONFIG_SNMPTRAP_FILE, "/tmp/zabbix_traps.tmp");
+
+ if (NULL == CONFIG_PID_FILE)
+- CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/tmp/zabbix_server.pid");
++ CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/var/run/zabbix/zabbix_server.pid");
+
+ if (NULL == CONFIG_ALERT_SCRIPTS_PATH)
+ CONFIG_ALERT_SCRIPTS_PATH = zbx_strdup(CONFIG_ALERT_SCRIPTS_PATH, DATADIR "/zabbix/alertscripts");
diff --git a/net-mgmt/zabbix2-server/files/zabbix_agentd.in b/net-mgmt/zabbix2-server/files/zabbix_agentd.in
index ddff711848b5..41a677bd7ef8 100644
--- a/net-mgmt/zabbix2-server/files/zabbix_agentd.in
+++ b/net-mgmt/zabbix2-server/files/zabbix_agentd.in
@@ -9,10 +9,10 @@
#
# zabbix_agentd_enable (bool): Set to NO by default. Set it to YES to
# enable zabbix_agentd.
-# zabbix_agentd_paths (string): Set to standard path by default. Set a search
-# if you have custom userparams that need binaries elsewhere.
# zabbix_agentd_config (string): Set to the standard config file path by
# default.
+# zabbix_agentd_pidfile (string): Location of the asterisk pid file
+# Default is /var/run/zabbix/zabbix_agentd.pid
#
. /etc/rc.subr
@@ -22,22 +22,27 @@ rcvar=zabbix_agentd_enable
load_rc_config $name
-: ${zabbix_agentd_enable="NO"}
-: ${zabbix_agentd_paths=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin}
-: ${zabbix_agentd_config="%%ETCDIR%%/${name}.conf"}
+: ${zabbix_agentd_enable:=NO}
+: ${zabbix_agentd_config:=%%ETCDIR%%/${name}.conf}
+: ${zabbix_agentd_pidfile:=/var/run/zabbix/zabbix_agentd.pid}
command="%%PREFIX%%/sbin/${name}"
required_files="${zabbix_agentd_config}"
-start_precmd="find_pidfile"
-status_precmd="find_pidfile"
-stop_precmd="find_pidfile"
-find_pidfile()
+start_precmd=zabbix_agentd_precmd
+status_precmd=zabbix_agentd_precmd
+stop_precmd=zabbix_agentd_precmd
+
+zabbix_agentd_precmd()
{
if get_pidfile_from_conf PidFile ${zabbix_agentd_config}; then
pidfile="$_pidfile_from_conf"
else
- pidfile="/tmp/${name}.pid"
+ pidfile=${zabbix_agentd_pidfile}
+ local rundir=${zabbix_agentd_pidfile%/*}
+ if [ ! -d $rundir ] ; then
+ install -d -m 0755 -o zabbix -g zabbix $rundir
+ fi
fi
# This shouldn't be necessary with pidfile, but empirically it was the
@@ -47,6 +52,4 @@ find_pidfile()
rc_pid=$(check_pidfile ${pidfile} ${command})
}
-export PATH="${zabbix_agentd_paths}"
-
run_rc_command "$1"
diff --git a/net-mgmt/zabbix2-server/files/zabbix_proxy.in b/net-mgmt/zabbix2-server/files/zabbix_proxy.in
index 407c7313655a..a627f4573438 100644
--- a/net-mgmt/zabbix2-server/files/zabbix_proxy.in
+++ b/net-mgmt/zabbix2-server/files/zabbix_proxy.in
@@ -1,7 +1,9 @@
#!/bin/sh
# PROVIDE: zabbix_proxy
-# REQUIRE: DAEMON%%ZABBIX_REQUIRE%%
+# REQUIRE: DAEMON
+%%PGSQL%%# REQUIRE: postgresql
+%%MYSQL%%# REQUIRE: mysql-server
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to
@@ -9,10 +11,10 @@
#
# zabbix_proxy_enable (bool): Set to NO by default. Set it to YES to
# enable zabbix_proxy.
-# zabbix_proxy_paths (string): Set to standard path by default. Set a search
-# if you have custom externals that need binaries elsewhere.
# zabbix_proxy_config (string): Set to the standard config file path by
# default.
+# zabbix_proxy_pidfile (string): Location of the asterisk pid file
+# Default is /var/run/zabbix/zabbix_proxy.pid
#
. /etc/rc.subr
@@ -22,23 +24,27 @@ rcvar=zabbix_proxy_enable
load_rc_config $name
-: ${zabbix_proxy_enable="NO"}
-: ${zabbix_proxy_paths=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin}
-: ${zabbix_proxy_config="%%ETCDIR%%/${name}.conf"}
+: ${zabbix_proxy_enable:=NO}
+: ${zabbix_proxy_config:=%%ETCDIR%%/${name}.conf}
+: ${zabbix_proxy_pidfile:=/var/run/zabbix/zabbix_proxy.pid}
command="%%PREFIX%%/sbin/${name}"
required_files="${zabbix_proxy_config}"
-start_precmd="find_pidfile"
-status_precmd="find_pidfile"
-stop_precmd="find_pidfile"
+start_precmd=zabbix_proxy_precmd
+status_precmd=zabbix_proxy_precmd
+stop_precmd=zabbix_proxy_precmd
-find_pidfile()
+zabbix_proxy_precmd()
{
- if get_pidfile_from_conf PidFile ${zabbix_agentd_config}; then
+ if get_pidfile_from_conf PidFile ${zabbix_proxy_config}; then
pidfile="$_pidfile_from_conf"
else
- pidfile="/tmp/${name}.pid"
+ pidfile=${zabbix_proxy_pidfile}
+ local rundir=${zabbix_proxy_pidfile%/*}
+ if [ ! -d $rundir ] ; then
+ install -d -m 0755 -o zabbix -g zabbix $rundir
+ fi
fi
# This shouldn't be necessary with pidfile, but empirically it was the
@@ -48,6 +54,4 @@ find_pidfile()
rc_pid=$(check_pidfile ${pidfile} ${command})
}
-export PATH="${zabbix_proxy_paths}"
-
run_rc_command "$1"
diff --git a/net-mgmt/zabbix2-server/files/zabbix_server.in b/net-mgmt/zabbix2-server/files/zabbix_server.in
index 50cfe3f37a73..d130b0accdbe 100644
--- a/net-mgmt/zabbix2-server/files/zabbix_server.in
+++ b/net-mgmt/zabbix2-server/files/zabbix_server.in
@@ -1,7 +1,9 @@
#!/bin/sh
# PROVIDE: zabbix_server
-# REQUIRE: DAEMON%%ZABBIX_REQUIRE%%
+# REQUIRE: DAEMON
+%%PGSQL%%# REQUIRE: postgresql
+%%MYSQL%%# REQUIRE: mysql-server
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to
@@ -9,10 +11,10 @@
#
# zabbix_server_enable (bool): Set to NO by default. Set it to YES to
# enable zabbix_server.
-# zabbix_server_paths (string): Set to standard path by default. Set a search
-# if you have custom externals that need binaries elsewhere.
# zabbix_server_config (string): Set to the standard config file path by
# default.
+# zabbix_server_pidfile (string): Location of the asterisk pid file
+# Default is /var/run/zabbix/zabbix_server.pid
#
. /etc/rc.subr
@@ -22,22 +24,27 @@ rcvar=zabbix_server_enable
load_rc_config $name
-: ${zabbix_server_enable="NO"}
-: ${zabbix_server_paths=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin}
-: ${zabbix_server_config="%%ETCDIR%%/${name}.conf"}
+: ${zabbix_server_enable:=NO}
+: ${zabbix_server_config:=%%ETCDIR%%/${name}.conf}
+: ${zabbix_server_pidfile:=/var/run/zabbix/zabbix_server.pid}
command="%%PREFIX%%/sbin/${name}"
required_files="${zabbix_server_config}"
-start_precmd="find_pidfile"
-status_precmd="find_pidfile"
-stop_precmd="find_pidfile"
-find_pidfile()
+start_precmd=zabbix_server_precmd
+status_precmd=zabbix_server_precmd
+stop_precmd=zabbix_server_precmd
+
+zabbix_server_precmd()
{
- if get_pidfile_from_conf PidFile ${zabbix_agentd_config}; then
+ if get_pidfile_from_conf PidFile ${zabbix_server_config}; then
pidfile="$_pidfile_from_conf"
else
- pidfile="/tmp/${name}.pid"
+ pidfile=${zabbix_server_pidfile}
+ local rundir=${zabbix_server_pidfile%/*}
+ if [ ! -d $rundir ] ; then
+ install -d -m 0755 -o zabbix -g zabbix $rundir
+ fi
fi
# This shouldn't be necessary with pidfile, but empirically it was the
@@ -47,6 +54,4 @@ find_pidfile()
rc_pid=$(check_pidfile ${pidfile} ${command})
}
-export PATH="${zabbix_server_paths}"
-
run_rc_command "$1"