summaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2003-08-30 08:06:39 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2003-08-30 08:06:39 +0000
commitd7af773d2622ec79618180715233b8ee9506aa64 (patch)
treeee78d372cffc4f52108f7db583957d6ef3e24f11 /net-mgmt
parentNew port: net/zabbix - advanced network monitoring system (diff)
New port: net/zabbix - advanced network monitoring system
Zabbix is software for application and network monitoring. Zabbix supports both polling and trapping techniques to collect data from monitored hosts. Flexible notification mechanism allows easy and quckly configure email notifications for pre-defined events. Zabbix is freely available under the terms of the GNU General Public License (GPL). PR: ports/54565 Submitted by: Sergey Akifyev <asa@gascom.ru>
Notes
Notes: svn path=/head/; revision=88063
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/zabbix/Makefile69
-rw-r--r--net-mgmt/zabbix/distinfo1
-rw-r--r--net-mgmt/zabbix/files/patch-src-zabbix_sucker-Makefile.in12
-rw-r--r--net-mgmt/zabbix/pkg-descr8
-rw-r--r--net-mgmt/zabbix/pkg-install44
-rw-r--r--net-mgmt/zabbix/pkg-message10
-rw-r--r--net-mgmt/zabbix/pkg-plist81
-rw-r--r--net-mgmt/zabbix/pkg-plist.agent9
-rw-r--r--net-mgmt/zabbix/scripts/dbsetup.sh5
-rw-r--r--net-mgmt/zabbix/scripts/zabbix-agent.sh.sample14
-rw-r--r--net-mgmt/zabbix/scripts/zabbix.sh.sample16
-rw-r--r--net-mgmt/zabbix2/Makefile69
-rw-r--r--net-mgmt/zabbix2/distinfo1
-rw-r--r--net-mgmt/zabbix2/files/patch-src-zabbix_sucker-Makefile.in12
-rw-r--r--net-mgmt/zabbix2/pkg-descr8
-rw-r--r--net-mgmt/zabbix2/pkg-install44
-rw-r--r--net-mgmt/zabbix2/pkg-message10
-rw-r--r--net-mgmt/zabbix2/pkg-plist81
-rw-r--r--net-mgmt/zabbix2/pkg-plist.agent9
-rw-r--r--net-mgmt/zabbix2/scripts/dbsetup.sh5
-rw-r--r--net-mgmt/zabbix2/scripts/zabbix-agent.sh.sample14
-rw-r--r--net-mgmt/zabbix2/scripts/zabbix.sh.sample16
22 files changed, 538 insertions, 0 deletions
diff --git a/net-mgmt/zabbix/Makefile b/net-mgmt/zabbix/Makefile
new file mode 100644
index 000000000000..1b74335026c0
--- /dev/null
+++ b/net-mgmt/zabbix/Makefile
@@ -0,0 +1,69 @@
+# Ports collection makefile for: zabbix
+# Date created: Jun 18 2003
+# Whom: Sergey Akifyev <asa@gascom.ru>
+#
+# $FreeBSD$
+#
+
+PORTNAME= zabbix
+PORTVERSION= 1.0b7
+CATEGORIES= net
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR=${PORTNAME}
+DISTNAME= ${PORTNAME}-1.0beta7
+
+MAINTAINER= asa@gascom.ru
+COMMENT= Very advanced network monitoring system
+
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= CPPFLAGS=-I${LOCALBASE}/include \
+ LIBS=-L${LOCALBASE}/lib
+CFLAGS+= -I${LOCALBASE}/include
+CONFIGURE_ARGS= --prefix=${PREFIX}
+
+.ifdef(ZABBIX_AGENT_ONLY)
+PKGNAMESUFFIX= -agent
+PLIST= ${MASTERDIR}/pkg-plist.agent
+PKGMESSAGE= nonexistent
+.else
+CONFIGURE_ARGS+=--with-mysql=${LOCALBASE}
+LIB_DEPENDS+= snmp.4:${PORTSDIR}/net/net-snmp4 \
+ mysqlclient.10:${PORTSDIR}/databases/mysql323-client
+BUILD_DEPENDS+= mysql:${PORTSDIR}/databases/mysql323-client
+RUN_DEPENDS+= safe_mysqld:${PORTSDIR}/databases/mysql323-server
+.endif
+
+ZABBIX_BINARIES=zabbix_agent zabbix_agentd zabbix_sender
+ZABBIX_CONFIGS= zabbix_agent.conf zabbix_agentd.conf
+.ifndef(ZABBIX_AGENT_ONLY)
+ZABBIX_BINARIES+=zabbix_suckerd zabbix_trapper zabbix_trapperd
+ZABBIX_CONFIGS+=zabbix_suckerd.conf zabbix_trapper.conf zabbix_trapperd.conf
+.endif
+
+do-install:
+.for FILE in ${ZABBIX_BINARIES}
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/${FILE} ${PREFIX}/bin
+.endfor
+ ${MKDIR} ${PREFIX}/etc/zabbix
+ ${LN} -sf ${PREFIX}/etc/zabbix /etc/zabbix
+.for FILE in ${ZABBIX_CONFIGS}
+ ${INSTALL_DATA} ${WRKSRC}/misc/conf/${FILE} \
+ ${PREFIX}/etc/zabbix/${FILE}.sample
+.endfor
+.ifndef(ZABBIX_AGENT_ONLY)
+ ${MKDIR} ${PREFIX}/share/zabbix
+ ${MKDIR} ${PREFIX}/share/zabbix/create
+ ${INSTALL_DATA} ${MASTERDIR}/scripts/dbsetup.sh \
+ ${PREFIX}/share/zabbix/create
+ ${CP} -Rf ${WRKSRC}/frontends/* ${PREFIX}/share/zabbix
+ ${CP} -Rf ${WRKSRC}/create/* ${PREFIX}/share/zabbix/create
+ ${INSTALL_SCRIPT} ${MASTERDIR}/scripts/dbsetup.sh \
+ ${PREFIX}/share/zabbix/create
+ ${INSTALL_SCRIPT} ${MASTERDIR}/scripts/zabbix.sh.sample \
+ ${PREFIX}/etc/rc.d
+.endif
+ ${INSTALL_SCRIPT} ${MASTERDIR}/scripts/zabbix-agent.sh.sample \
+ ${PREFIX}/etc/rc.d
+ ${SH} ${PKGINSTALL}
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/zabbix/distinfo b/net-mgmt/zabbix/distinfo
new file mode 100644
index 000000000000..34126d67f0af
--- /dev/null
+++ b/net-mgmt/zabbix/distinfo
@@ -0,0 +1 @@
+MD5 (zabbix-1.0beta7.tar.gz) = 07545fbbbd8c85936a89aaabd8842f7e
diff --git a/net-mgmt/zabbix/files/patch-src-zabbix_sucker-Makefile.in b/net-mgmt/zabbix/files/patch-src-zabbix_sucker-Makefile.in
new file mode 100644
index 000000000000..bd26bf29a71a
--- /dev/null
+++ b/net-mgmt/zabbix/files/patch-src-zabbix_sucker-Makefile.in
@@ -0,0 +1,12 @@
+--- src/zabbix_sucker/Makefile.in.orig Wed Jun 18 16:53:26 2003
++++ src/zabbix_sucker/Makefile.in Sun Dec 8 17:34:48 2002
+@@ -1,7 +1,7 @@
+ # Build rules
+
+-INCLUDE = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@
+-LIBS = @LIBS@ @MYSQL_LFLAGS@ @PGSQL_LFLAGS@
++INCLUDE = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@ -I/usr/local/include
++LIBS = @LIBS@ @MYSQL_LFLAGS@ @PGSQL_LFLAGS@ -L/usr/local/lib -lsnmp
+
+ all:
+
diff --git a/net-mgmt/zabbix/pkg-descr b/net-mgmt/zabbix/pkg-descr
new file mode 100644
index 000000000000..a85383fa4768
--- /dev/null
+++ b/net-mgmt/zabbix/pkg-descr
@@ -0,0 +1,8 @@
+Zabbix is software for application and network monitoring.
+Zabbix supports both polling and trapping techniques to
+collect data from monitored hosts. Flexible notification
+mechanism allows easy and quckly configure email notifications
+for pre-defined events. Zabbix is freely available under the
+terms of the GNU General Public License (GPL).
+
+WWW: http://zabbix.sourceforge.net/
diff --git a/net-mgmt/zabbix/pkg-install b/net-mgmt/zabbix/pkg-install
new file mode 100644
index 000000000000..cdcc64291c85
--- /dev/null
+++ b/net-mgmt/zabbix/pkg-install
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Script was taken from mysql323-server port, and modified
+# to suit zabbix needs
+
+PATH=/bin:/usr/sbin
+
+case $2 in
+POST-INSTALL)
+ USER=zabbix
+ GROUP=${USER}
+ UID=112
+ GID=${UID}
+
+ if pw group show "${GROUP}" 2>/dev/null; then
+ echo "You already have a group \"${GROUP}\", so I will use it."
+ else
+ if pw groupadd ${GROUP} -g ${GID}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+ fi
+
+ if pw user show "${USER}" 2>/dev/null; then
+ echo "You already have a user \"${USER}\", so I will use it."
+ if pw usermod ${USER} -d /nonexistent
+ then
+ echo "Changed home directory of \"${USER}\" to /nonexistent"
+ else
+ echo "Changing home directory of \"${USER}\" to /nonexistent failed..."
+ exit 1
+ fi
+ else
+ if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
+ -d /nonexistent -s /sbin/nologin -c "MySQL Daemon"
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ exit 1
+ fi
+ fi
+esac
diff --git a/net-mgmt/zabbix/pkg-message b/net-mgmt/zabbix/pkg-message
new file mode 100644
index 000000000000..9e3c2a8e3e21
--- /dev/null
+++ b/net-mgmt/zabbix/pkg-message
@@ -0,0 +1,10 @@
+====================================================
+ACHTUNG!!!
+
+1) Run dbsetup.sh from ${PREFIX}/share/zabbix/create
+to setup database tables
+
+2) Install apache with mod_php (it should be
+GD-enabled for graphs to work) and point it
+to serve from ${PREFIX}/share/zabbix/php
+====================================================
diff --git a/net-mgmt/zabbix/pkg-plist b/net-mgmt/zabbix/pkg-plist
new file mode 100644
index 000000000000..c9b2edf03603
--- /dev/null
+++ b/net-mgmt/zabbix/pkg-plist
@@ -0,0 +1,81 @@
+etc/zabbix/zabbix_agent.conf.sample
+etc/zabbix/zabbix_agentd.conf.sample
+etc/zabbix/zabbix_suckerd.conf.sample
+etc/zabbix/zabbix_trapper.conf.sample
+etc/zabbix/zabbix_trapperd.conf.sample
+etc/rc.d/zabbix.sh.sample
+etc/rc.d/zabbix-agent.sh.sample
+bin/zabbix_agent
+bin/zabbix_agentd
+bin/zabbix_sender
+bin/zabbix_suckerd
+bin/zabbix_trapper
+bin/zabbix_trapperd
+@dirrm etc/zabbix
+share/zabbix/php/audio/warning_off.wav
+share/zabbix/php/audio/warning_on.wav
+share/zabbix/php/about.php
+share/zabbix/php/actions.php
+share/zabbix/php/alarms.php
+share/zabbix/php/alerts.php
+share/zabbix/php/chart.php
+share/zabbix/php/chart2.php
+share/zabbix/php/chart3.php
+share/zabbix/php/chart4.php
+share/zabbix/php/chart5.php
+share/zabbix/php/chart_diff.php
+share/zabbix/php/charts.php
+share/zabbix/php/compare.php
+share/zabbix/php/config.php
+share/zabbix/php/css.css
+share/zabbix/php/graph.php
+share/zabbix/php/graphs.php
+share/zabbix/php/helpdesk.php
+share/zabbix/php/history.php
+share/zabbix/php/hosts.php
+share/zabbix/php/index.php
+share/zabbix/php/items.php
+share/zabbix/php/latest.php
+share/zabbix/php/latestalarms.php
+share/zabbix/php/map.php
+share/zabbix/php/maps.php
+share/zabbix/php/media.php
+share/zabbix/php/queue.php
+share/zabbix/php/report1.php
+share/zabbix/php/report2.php
+share/zabbix/php/services.php
+share/zabbix/php/srv_status.php
+share/zabbix/php/sysmap.php
+share/zabbix/php/sysmaps.php
+share/zabbix/php/tr_comments.php
+share/zabbix/php/tr_status.php
+share/zabbix/php/trend.php
+share/zabbix/php/trends.php
+share/zabbix/php/triggers.php
+share/zabbix/php/users.php
+share/zabbix/php/images/sysmaps/Notebook.png
+share/zabbix/php/images/sysmaps/Hub.png
+share/zabbix/php/images/sysmaps/Printer.png
+share/zabbix/php/images/sysmaps/Router.png
+share/zabbix/php/images/sysmaps/Server.png
+share/zabbix/php/images/sysmaps/Workstation.png
+share/zabbix/php/include/.htaccess
+share/zabbix/php/include/config.inc.php
+share/zabbix/php/include/db.inc.php
+share/zabbix/php/include/defines.inc.php
+share/zabbix/create/data/data.sql
+share/zabbix/create/mysql/schema.sql
+share/zabbix/create/postgresql/schema.sql
+share/zabbix/create/dbsetup.sh
+@dirrm share/zabbix/php/audio
+@dirrm share/zabbix/php/images/sysmaps
+@dirrm share/zabbix/php/images
+@dirrm share/zabbix/php/include
+@dirrm share/zabbix/php
+@dirrm share/zabbix/create/data
+@dirrm share/zabbix/create/mysql
+@dirrm share/zabbix/create/postgresql
+@dirrm share/zabbix/create
+@dirrm share/zabbix
+@exec ln -sf %D/etc/zabbix /etc/zabbix
+@unexec rm /etc/zabbix
diff --git a/net-mgmt/zabbix/pkg-plist.agent b/net-mgmt/zabbix/pkg-plist.agent
new file mode 100644
index 000000000000..4484802d326d
--- /dev/null
+++ b/net-mgmt/zabbix/pkg-plist.agent
@@ -0,0 +1,9 @@
+bin/zabbix_agent
+bin/zabbix_agentd
+bin/zabbix_sender
+etc/zabbix/zabbix_agent.conf.sample
+etc/zabbix/zabbix_agentd.conf.sample
+etc/rc.d/zabbix-agent.sh.sample
+@dirrm /etc/zabbix
+@exec ln -sf %D/etc/zabbix /etc/zabbix
+@unexec rm /etc/zabbix
diff --git a/net-mgmt/zabbix/scripts/dbsetup.sh b/net-mgmt/zabbix/scripts/dbsetup.sh
new file mode 100644
index 000000000000..4ae8e4381893
--- /dev/null
+++ b/net-mgmt/zabbix/scripts/dbsetup.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+echo "create database zabbix;" | mysql
+cat mysql/schema.sql | mysql zabbix
+cat data/data.sql | mysql zabbix
diff --git a/net-mgmt/zabbix/scripts/zabbix-agent.sh.sample b/net-mgmt/zabbix/scripts/zabbix-agent.sh.sample
new file mode 100644
index 000000000000..e5728bd24051
--- /dev/null
+++ b/net-mgmt/zabbix/scripts/zabbix-agent.sh.sample
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+case "${1}" in
+ start)
+ echo -n "zabbix-agent "
+ zabbix_agentd
+ ;;
+ stop)
+ killall zabbix_agentd
+ ;;
+ *)
+ echo Usage: `basename ${0}` "{start|stop}"
+ ;;
+esac
diff --git a/net-mgmt/zabbix/scripts/zabbix.sh.sample b/net-mgmt/zabbix/scripts/zabbix.sh.sample
new file mode 100644
index 000000000000..58c0529b4099
--- /dev/null
+++ b/net-mgmt/zabbix/scripts/zabbix.sh.sample
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+case "${1}" in
+ start)
+ echo -n "zabbix "
+ zabbix_suckerd
+ zabbix_trapperd
+ ;;
+ stop)
+ killall zabbix_suckerd
+ killall zabbix_trapperd
+ ;;
+ *)
+ echo Usage: `basename ${0}` "{start|stop}"
+ ;;
+esac
diff --git a/net-mgmt/zabbix2/Makefile b/net-mgmt/zabbix2/Makefile
new file mode 100644
index 000000000000..1b74335026c0
--- /dev/null
+++ b/net-mgmt/zabbix2/Makefile
@@ -0,0 +1,69 @@
+# Ports collection makefile for: zabbix
+# Date created: Jun 18 2003
+# Whom: Sergey Akifyev <asa@gascom.ru>
+#
+# $FreeBSD$
+#
+
+PORTNAME= zabbix
+PORTVERSION= 1.0b7
+CATEGORIES= net
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR=${PORTNAME}
+DISTNAME= ${PORTNAME}-1.0beta7
+
+MAINTAINER= asa@gascom.ru
+COMMENT= Very advanced network monitoring system
+
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= CPPFLAGS=-I${LOCALBASE}/include \
+ LIBS=-L${LOCALBASE}/lib
+CFLAGS+= -I${LOCALBASE}/include
+CONFIGURE_ARGS= --prefix=${PREFIX}
+
+.ifdef(ZABBIX_AGENT_ONLY)
+PKGNAMESUFFIX= -agent
+PLIST= ${MASTERDIR}/pkg-plist.agent
+PKGMESSAGE= nonexistent
+.else
+CONFIGURE_ARGS+=--with-mysql=${LOCALBASE}
+LIB_DEPENDS+= snmp.4:${PORTSDIR}/net/net-snmp4 \
+ mysqlclient.10:${PORTSDIR}/databases/mysql323-client
+BUILD_DEPENDS+= mysql:${PORTSDIR}/databases/mysql323-client
+RUN_DEPENDS+= safe_mysqld:${PORTSDIR}/databases/mysql323-server
+.endif
+
+ZABBIX_BINARIES=zabbix_agent zabbix_agentd zabbix_sender
+ZABBIX_CONFIGS= zabbix_agent.conf zabbix_agentd.conf
+.ifndef(ZABBIX_AGENT_ONLY)
+ZABBIX_BINARIES+=zabbix_suckerd zabbix_trapper zabbix_trapperd
+ZABBIX_CONFIGS+=zabbix_suckerd.conf zabbix_trapper.conf zabbix_trapperd.conf
+.endif
+
+do-install:
+.for FILE in ${ZABBIX_BINARIES}
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/${FILE} ${PREFIX}/bin
+.endfor
+ ${MKDIR} ${PREFIX}/etc/zabbix
+ ${LN} -sf ${PREFIX}/etc/zabbix /etc/zabbix
+.for FILE in ${ZABBIX_CONFIGS}
+ ${INSTALL_DATA} ${WRKSRC}/misc/conf/${FILE} \
+ ${PREFIX}/etc/zabbix/${FILE}.sample
+.endfor
+.ifndef(ZABBIX_AGENT_ONLY)
+ ${MKDIR} ${PREFIX}/share/zabbix
+ ${MKDIR} ${PREFIX}/share/zabbix/create
+ ${INSTALL_DATA} ${MASTERDIR}/scripts/dbsetup.sh \
+ ${PREFIX}/share/zabbix/create
+ ${CP} -Rf ${WRKSRC}/frontends/* ${PREFIX}/share/zabbix
+ ${CP} -Rf ${WRKSRC}/create/* ${PREFIX}/share/zabbix/create
+ ${INSTALL_SCRIPT} ${MASTERDIR}/scripts/dbsetup.sh \
+ ${PREFIX}/share/zabbix/create
+ ${INSTALL_SCRIPT} ${MASTERDIR}/scripts/zabbix.sh.sample \
+ ${PREFIX}/etc/rc.d
+.endif
+ ${INSTALL_SCRIPT} ${MASTERDIR}/scripts/zabbix-agent.sh.sample \
+ ${PREFIX}/etc/rc.d
+ ${SH} ${PKGINSTALL}
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/zabbix2/distinfo b/net-mgmt/zabbix2/distinfo
new file mode 100644
index 000000000000..34126d67f0af
--- /dev/null
+++ b/net-mgmt/zabbix2/distinfo
@@ -0,0 +1 @@
+MD5 (zabbix-1.0beta7.tar.gz) = 07545fbbbd8c85936a89aaabd8842f7e
diff --git a/net-mgmt/zabbix2/files/patch-src-zabbix_sucker-Makefile.in b/net-mgmt/zabbix2/files/patch-src-zabbix_sucker-Makefile.in
new file mode 100644
index 000000000000..bd26bf29a71a
--- /dev/null
+++ b/net-mgmt/zabbix2/files/patch-src-zabbix_sucker-Makefile.in
@@ -0,0 +1,12 @@
+--- src/zabbix_sucker/Makefile.in.orig Wed Jun 18 16:53:26 2003
++++ src/zabbix_sucker/Makefile.in Sun Dec 8 17:34:48 2002
+@@ -1,7 +1,7 @@
+ # Build rules
+
+-INCLUDE = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@
+-LIBS = @LIBS@ @MYSQL_LFLAGS@ @PGSQL_LFLAGS@
++INCLUDE = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@ -I/usr/local/include
++LIBS = @LIBS@ @MYSQL_LFLAGS@ @PGSQL_LFLAGS@ -L/usr/local/lib -lsnmp
+
+ all:
+
diff --git a/net-mgmt/zabbix2/pkg-descr b/net-mgmt/zabbix2/pkg-descr
new file mode 100644
index 000000000000..a85383fa4768
--- /dev/null
+++ b/net-mgmt/zabbix2/pkg-descr
@@ -0,0 +1,8 @@
+Zabbix is software for application and network monitoring.
+Zabbix supports both polling and trapping techniques to
+collect data from monitored hosts. Flexible notification
+mechanism allows easy and quckly configure email notifications
+for pre-defined events. Zabbix is freely available under the
+terms of the GNU General Public License (GPL).
+
+WWW: http://zabbix.sourceforge.net/
diff --git a/net-mgmt/zabbix2/pkg-install b/net-mgmt/zabbix2/pkg-install
new file mode 100644
index 000000000000..cdcc64291c85
--- /dev/null
+++ b/net-mgmt/zabbix2/pkg-install
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Script was taken from mysql323-server port, and modified
+# to suit zabbix needs
+
+PATH=/bin:/usr/sbin
+
+case $2 in
+POST-INSTALL)
+ USER=zabbix
+ GROUP=${USER}
+ UID=112
+ GID=${UID}
+
+ if pw group show "${GROUP}" 2>/dev/null; then
+ echo "You already have a group \"${GROUP}\", so I will use it."
+ else
+ if pw groupadd ${GROUP} -g ${GID}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+ fi
+
+ if pw user show "${USER}" 2>/dev/null; then
+ echo "You already have a user \"${USER}\", so I will use it."
+ if pw usermod ${USER} -d /nonexistent
+ then
+ echo "Changed home directory of \"${USER}\" to /nonexistent"
+ else
+ echo "Changing home directory of \"${USER}\" to /nonexistent failed..."
+ exit 1
+ fi
+ else
+ if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
+ -d /nonexistent -s /sbin/nologin -c "MySQL Daemon"
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ exit 1
+ fi
+ fi
+esac
diff --git a/net-mgmt/zabbix2/pkg-message b/net-mgmt/zabbix2/pkg-message
new file mode 100644
index 000000000000..9e3c2a8e3e21
--- /dev/null
+++ b/net-mgmt/zabbix2/pkg-message
@@ -0,0 +1,10 @@
+====================================================
+ACHTUNG!!!
+
+1) Run dbsetup.sh from ${PREFIX}/share/zabbix/create
+to setup database tables
+
+2) Install apache with mod_php (it should be
+GD-enabled for graphs to work) and point it
+to serve from ${PREFIX}/share/zabbix/php
+====================================================
diff --git a/net-mgmt/zabbix2/pkg-plist b/net-mgmt/zabbix2/pkg-plist
new file mode 100644
index 000000000000..c9b2edf03603
--- /dev/null
+++ b/net-mgmt/zabbix2/pkg-plist
@@ -0,0 +1,81 @@
+etc/zabbix/zabbix_agent.conf.sample
+etc/zabbix/zabbix_agentd.conf.sample
+etc/zabbix/zabbix_suckerd.conf.sample
+etc/zabbix/zabbix_trapper.conf.sample
+etc/zabbix/zabbix_trapperd.conf.sample
+etc/rc.d/zabbix.sh.sample
+etc/rc.d/zabbix-agent.sh.sample
+bin/zabbix_agent
+bin/zabbix_agentd
+bin/zabbix_sender
+bin/zabbix_suckerd
+bin/zabbix_trapper
+bin/zabbix_trapperd
+@dirrm etc/zabbix
+share/zabbix/php/audio/warning_off.wav
+share/zabbix/php/audio/warning_on.wav
+share/zabbix/php/about.php
+share/zabbix/php/actions.php
+share/zabbix/php/alarms.php
+share/zabbix/php/alerts.php
+share/zabbix/php/chart.php
+share/zabbix/php/chart2.php
+share/zabbix/php/chart3.php
+share/zabbix/php/chart4.php
+share/zabbix/php/chart5.php
+share/zabbix/php/chart_diff.php
+share/zabbix/php/charts.php
+share/zabbix/php/compare.php
+share/zabbix/php/config.php
+share/zabbix/php/css.css
+share/zabbix/php/graph.php
+share/zabbix/php/graphs.php
+share/zabbix/php/helpdesk.php
+share/zabbix/php/history.php
+share/zabbix/php/hosts.php
+share/zabbix/php/index.php
+share/zabbix/php/items.php
+share/zabbix/php/latest.php
+share/zabbix/php/latestalarms.php
+share/zabbix/php/map.php
+share/zabbix/php/maps.php
+share/zabbix/php/media.php
+share/zabbix/php/queue.php
+share/zabbix/php/report1.php
+share/zabbix/php/report2.php
+share/zabbix/php/services.php
+share/zabbix/php/srv_status.php
+share/zabbix/php/sysmap.php
+share/zabbix/php/sysmaps.php
+share/zabbix/php/tr_comments.php
+share/zabbix/php/tr_status.php
+share/zabbix/php/trend.php
+share/zabbix/php/trends.php
+share/zabbix/php/triggers.php
+share/zabbix/php/users.php
+share/zabbix/php/images/sysmaps/Notebook.png
+share/zabbix/php/images/sysmaps/Hub.png
+share/zabbix/php/images/sysmaps/Printer.png
+share/zabbix/php/images/sysmaps/Router.png
+share/zabbix/php/images/sysmaps/Server.png
+share/zabbix/php/images/sysmaps/Workstation.png
+share/zabbix/php/include/.htaccess
+share/zabbix/php/include/config.inc.php
+share/zabbix/php/include/db.inc.php
+share/zabbix/php/include/defines.inc.php
+share/zabbix/create/data/data.sql
+share/zabbix/create/mysql/schema.sql
+share/zabbix/create/postgresql/schema.sql
+share/zabbix/create/dbsetup.sh
+@dirrm share/zabbix/php/audio
+@dirrm share/zabbix/php/images/sysmaps
+@dirrm share/zabbix/php/images
+@dirrm share/zabbix/php/include
+@dirrm share/zabbix/php
+@dirrm share/zabbix/create/data
+@dirrm share/zabbix/create/mysql
+@dirrm share/zabbix/create/postgresql
+@dirrm share/zabbix/create
+@dirrm share/zabbix
+@exec ln -sf %D/etc/zabbix /etc/zabbix
+@unexec rm /etc/zabbix
diff --git a/net-mgmt/zabbix2/pkg-plist.agent b/net-mgmt/zabbix2/pkg-plist.agent
new file mode 100644
index 000000000000..4484802d326d
--- /dev/null
+++ b/net-mgmt/zabbix2/pkg-plist.agent
@@ -0,0 +1,9 @@
+bin/zabbix_agent
+bin/zabbix_agentd
+bin/zabbix_sender
+etc/zabbix/zabbix_agent.conf.sample
+etc/zabbix/zabbix_agentd.conf.sample
+etc/rc.d/zabbix-agent.sh.sample
+@dirrm /etc/zabbix
+@exec ln -sf %D/etc/zabbix /etc/zabbix
+@unexec rm /etc/zabbix
diff --git a/net-mgmt/zabbix2/scripts/dbsetup.sh b/net-mgmt/zabbix2/scripts/dbsetup.sh
new file mode 100644
index 000000000000..4ae8e4381893
--- /dev/null
+++ b/net-mgmt/zabbix2/scripts/dbsetup.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+echo "create database zabbix;" | mysql
+cat mysql/schema.sql | mysql zabbix
+cat data/data.sql | mysql zabbix
diff --git a/net-mgmt/zabbix2/scripts/zabbix-agent.sh.sample b/net-mgmt/zabbix2/scripts/zabbix-agent.sh.sample
new file mode 100644
index 000000000000..e5728bd24051
--- /dev/null
+++ b/net-mgmt/zabbix2/scripts/zabbix-agent.sh.sample
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+case "${1}" in
+ start)
+ echo -n "zabbix-agent "
+ zabbix_agentd
+ ;;
+ stop)
+ killall zabbix_agentd
+ ;;
+ *)
+ echo Usage: `basename ${0}` "{start|stop}"
+ ;;
+esac
diff --git a/net-mgmt/zabbix2/scripts/zabbix.sh.sample b/net-mgmt/zabbix2/scripts/zabbix.sh.sample
new file mode 100644
index 000000000000..58c0529b4099
--- /dev/null
+++ b/net-mgmt/zabbix2/scripts/zabbix.sh.sample
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+case "${1}" in
+ start)
+ echo -n "zabbix "
+ zabbix_suckerd
+ zabbix_trapperd
+ ;;
+ stop)
+ killall zabbix_suckerd
+ killall zabbix_trapperd
+ ;;
+ *)
+ echo Usage: `basename ${0}` "{start|stop}"
+ ;;
+esac