network/zabbix_server: Updated for version 2.0.6.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
This commit is contained in:
parent
9b5f57e6ae
commit
31a515d267
|
@ -18,8 +18,7 @@ least the MySQL client on the box that will run zabbix_server.
|
||||||
0.1) zabbix group & user
|
0.1) zabbix group & user
|
||||||
|
|
||||||
Before running the zabbix_server.SlackBuild script, you will need to create
|
Before running the zabbix_server.SlackBuild script, you will need to create
|
||||||
the 'zabbix' user and group. The script won't run if these do not
|
the 'zabbix' user and group. The script won't run if these do not exist.
|
||||||
exist.
|
|
||||||
|
|
||||||
The suggested UID and GID is 228, but you can change this as needed:
|
The suggested UID and GID is 228, but you can change this as needed:
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# usage: ./rc.zabbix_server { start | stop | restart }
|
# Usage: ./rc.zabbix_server {start|stop|restart}
|
||||||
|
|
||||||
PRGNAM=zabbix_server
|
PRGNAM=zabbix_server
|
||||||
PRGDIR=/usr/sbin/
|
PRGDIR=/usr/sbin/
|
||||||
|
@ -10,7 +10,7 @@ DATE=$(date +%a\ %b\ %d\ %T\ %Y)
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
|
|
||||||
prg_start() {
|
prg_start() {
|
||||||
echo -n "Starting $PRGNAM ... "
|
echo -n "Starting $PRGNAM ... "
|
||||||
if [ -r ${PIDDIR}${PRGNAM}.pid ]; then
|
if [ -r ${PIDDIR}${PRGNAM}.pid ]; then
|
||||||
if $(! /sbin/pidof $PRGNAM > /dev/null 2>&1 ) ; then
|
if $(! /sbin/pidof $PRGNAM > /dev/null 2>&1 ) ; then
|
||||||
echo "Removing an old ${PIDDIR}${PRGNAM}.pid"
|
echo "Removing an old ${PIDDIR}${PRGNAM}.pid"
|
||||||
|
@ -23,15 +23,15 @@ prg_start() {
|
||||||
if [ $RETVAL -eq 0 ]; then
|
if [ $RETVAL -eq 0 ]; then
|
||||||
touch /var/lock/$PRGNAM
|
touch /var/lock/$PRGNAM
|
||||||
sleep 2
|
sleep 2
|
||||||
echo "Done"
|
echo "done"
|
||||||
else
|
else
|
||||||
echo "Failed"
|
echo "failed"
|
||||||
fi
|
fi
|
||||||
return $RETVAL
|
return $RETVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
prg_stop() {
|
prg_stop() {
|
||||||
echo -n "Stopping $PRGNAM ... "
|
echo -n "Stopping $PRGNAM ... "
|
||||||
if [ -r ${PIDDIR}${PRGNAM}.pid ]; then
|
if [ -r ${PIDDIR}${PRGNAM}.pid ]; then
|
||||||
killall $PRGNAM
|
killall $PRGNAM
|
||||||
# Give it some time to die gracefully
|
# Give it some time to die gracefully
|
||||||
|
@ -48,7 +48,7 @@ prg_stop() {
|
||||||
sleep 10
|
sleep 10
|
||||||
else
|
else
|
||||||
echo "$DATE EXIT: $PRGNAM stopped by user: $USER (UID: $EUID)" >> ${LOGDIR}${PRGNAM}.log
|
echo "$DATE EXIT: $PRGNAM stopped by user: $USER (UID: $EUID)" >> ${LOGDIR}${PRGNAM}.log
|
||||||
echo "Done"
|
echo "done"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
rm -f /var/lock/$PRGNAM
|
rm -f /var/lock/$PRGNAM
|
||||||
|
@ -70,8 +70,7 @@ case "$1" in
|
||||||
prg_start
|
prg_start
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo ""
|
echo "Usage: $(basename $0) {start|stop|restart }"
|
||||||
echo "Usage: $(basename $0) {start | stop | restart }"
|
|
||||||
RETVAL=1
|
RETVAL=1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Slackware build script for zabbix_server
|
# Slackware build script for zabbix_server
|
||||||
|
|
||||||
# Copyright 2012 Michal Bialozor, Gdansk, POLAND
|
# Copyright 2013 Michal Bialozor, Gdansk, Pomorskie, POLAND
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use of this script, with or without modification, is
|
# Redistribution and use of this script, with or without modification, is
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
PRGNAM=zabbix_server
|
PRGNAM=zabbix_server
|
||||||
VERSION=${VERSION:-1.8.16}
|
VERSION=${VERSION:-2.0.6}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
|
|
||||||
|
@ -95,16 +95,17 @@ CFLAGS="$SLKCFLAGS" \
|
||||||
CXXFLAGS="$SLKCFLAGS" \
|
CXXFLAGS="$SLKCFLAGS" \
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc/zabbix \
|
||||||
|
--datadir=/etc \
|
||||||
--localstatedir=/var/lib \
|
--localstatedir=/var/lib \
|
||||||
--mandir=/usr/man \
|
--mandir=/usr/man \
|
||||||
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
||||||
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
||||||
--enable-server \
|
--enable-server \
|
||||||
--with-mysql \
|
--with-mysql \
|
||||||
--with-net-snmp \
|
|
||||||
--with-jabber \
|
--with-jabber \
|
||||||
--with-libcurl \
|
--with-libcurl \
|
||||||
|
--with-net-snmp \
|
||||||
--with-ssh2 \
|
--with-ssh2 \
|
||||||
--with-ldap \
|
--with-ldap \
|
||||||
--build=$ARCH-slackware-linux
|
--build=$ARCH-slackware-linux
|
||||||
|
@ -125,9 +126,9 @@ cp -a frontends/php/* \
|
||||||
chown -R $PHPUSER:$PHPGROUP $PKG/$DOCROOT/$PRGSHORT
|
chown -R $PHPUSER:$PHPGROUP $PKG/$DOCROOT/$PRGSHORT
|
||||||
|
|
||||||
# Database scripts
|
# Database scripts
|
||||||
mkdir -p $PKG/usr/share/$PRGNAM/create $PKG/usr/share/$PRGNAM/upgrades
|
mkdir -p $PKG/usr/share/$PRGNAM/database/mysql
|
||||||
cp -a create/data create/schema \
|
cp -a database/mysql \
|
||||||
$PKG/usr/share/$PRGNAM/create/
|
$PKG/usr/share/$PRGNAM/database/
|
||||||
cp -a upgrades/dbpatches \
|
cp -a upgrades/dbpatches \
|
||||||
$PKG/usr/share/$PRGNAM/upgrades/
|
$PKG/usr/share/$PRGNAM/upgrades/
|
||||||
|
|
||||||
|
@ -135,18 +136,19 @@ cp -a upgrades/dbpatches \
|
||||||
mkdir -p $PKG/var/log/$PRGSHORT
|
mkdir -p $PKG/var/log/$PRGSHORT
|
||||||
touch $PKG/var/log/$PRGSHORT/$PRGNAM.log.new
|
touch $PKG/var/log/$PRGSHORT/$PRGNAM.log.new
|
||||||
chown -R $ZABBIXUSER:$ZABBIXGROUP $PKG/var/log/$PRGSHORT
|
chown -R $ZABBIXUSER:$ZABBIXGROUP $PKG/var/log/$PRGSHORT
|
||||||
|
chmod g+w $PKG/var/log/$PRGSHORT
|
||||||
|
|
||||||
# Dir for pid-file
|
# Dir for pid-file
|
||||||
mkdir -p $PKG/var/run/$PRGSHORT
|
mkdir -p $PKG/var/run/$PRGSHORT
|
||||||
chown -R $ZABBIXUSER:$ZABBIXGROUP $PKG/var/run/$PRGSHORT
|
chown -R $ZABBIXUSER:$ZABBIXGROUP $PKG/var/run/$PRGSHORT
|
||||||
|
chmod g+w $PKG/var/run/$PRGSHORT
|
||||||
|
|
||||||
# Configuration file
|
# Configuration file
|
||||||
mkdir -p $PKG/etc/$PRGSHORT/alertscripts $PKG/etc/$PRGSHORT/externalscripts \
|
|
||||||
$PKG/etc/$PRGSHORT/zabbix_server.conf.d
|
|
||||||
sed -e "s,# PidFile=/tmp/,PidFile=/var/run/$PRGSHORT/," \
|
sed -e "s,# PidFile=/tmp/,PidFile=/var/run/$PRGSHORT/," \
|
||||||
-e "s,# DBSocket=/tmp/,DBSocket=/var/run/mysql/," \
|
-e "s,# DBSocket=/tmp/,DBSocket=/var/run/mysql/," \
|
||||||
-e "s,LogFile=/tmp/,LogFile=/var/log/$PRGSHORT/," \
|
-e "s,LogFile=/tmp/,LogFile=/var/log/$PRGSHORT/," \
|
||||||
misc/conf/$PRGNAM.conf > $PKG/etc/$PRGSHORT/$PRGNAM.conf.new
|
$PKG/etc/$PRGSHORT/$PRGNAM.conf > $PKG/etc/$PRGSHORT/$PRGNAM.conf.new
|
||||||
|
rm -f $PKG/etc/$PRGSHORT/$PRGNAM.conf
|
||||||
|
|
||||||
# Init script
|
# Init script
|
||||||
mkdir -p $PKG/etc/rc.d
|
mkdir -p $PKG/etc/rc.d
|
||||||
|
@ -154,11 +156,12 @@ cat $CWD/rc.$PRGNAM > $PKG/etc/rc.d/rc.$PRGNAM.new
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
cp -a AUTHORS COPYING ChangeLog CREDITS INSTALL NEWS README \
|
cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README \
|
||||||
$PKG/usr/doc/$PRGNAM-$VERSION
|
$PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||||
cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
|
cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
|
||||||
|
|
||||||
|
# Installation scripts
|
||||||
mkdir -p $PKG/install
|
mkdir -p $PKG/install
|
||||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
PRGNAM="zabbix_server"
|
PRGNAM="zabbix_server"
|
||||||
VERSION="1.8.16"
|
VERSION="2.0.6"
|
||||||
HOMEPAGE="http://www.zabbix.com"
|
HOMEPAGE="http://www.zabbix.com"
|
||||||
DOWNLOAD="http://downloads.sourceforge.net/zabbix/zabbix-1.8.16.tar.gz"
|
DOWNLOAD="http://downloads.sourceforge.net/zabbix/zabbix-2.0.6.tar.gz"
|
||||||
MD5SUM="891b7a5c915f3060b66687a483dc0551"
|
MD5SUM="f7261987731dd74b58cb1da890655ddc"
|
||||||
DOWNLOAD_x86_64=""
|
DOWNLOAD_x86_64=""
|
||||||
MD5SUM_x86_64=""
|
MD5SUM_x86_64=""
|
||||||
REQUIRES="iksemel libssh2"
|
REQUIRES="iksemel jdk libssh2"
|
||||||
MAINTAINER="Michal Bialozor"
|
MAINTAINER="Michal Bialozor"
|
||||||
EMAIL="bialyy@o2.pl"
|
EMAIL="bialyy@o2.pl"
|
||||||
|
|
Loading…
Reference in New Issue