summaryrefslogtreecommitdiff
path: root/network/zabbix_agentd/zabbix_agentd.SlackBuild
diff options
context:
space:
mode:
authorMichal Bialozor <bialyy@o2.pl>2012-12-23 09:22:02 +0100
committerMatteo Bernardini <ponce@slackbuilds.org>2012-12-23 09:22:20 +0100
commitaefc350250d96dea417c40f2667075b7d5614aa9 (patch)
tree4fba893ecd685b7bff5755255a26338384690ab5 /network/zabbix_agentd/zabbix_agentd.SlackBuild
parentc23d5541e966e7ae99f94849f37017a96e02d2fc (diff)
downloadslackbuilds-aefc350250d96dea417c40f2667075b7d5614aa9.tar.gz
network/zabbix_agentd: Updated for version 1.8.15, cleanups.
(switched to new zabbixagent user http://bit.ly/TeN72F --ponce) Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/zabbix_agentd/zabbix_agentd.SlackBuild')
-rw-r--r--network/zabbix_agentd/zabbix_agentd.SlackBuild26
1 files changed, 13 insertions, 13 deletions
diff --git a/network/zabbix_agentd/zabbix_agentd.SlackBuild b/network/zabbix_agentd/zabbix_agentd.SlackBuild
index 93b393d348..1684447373 100644
--- a/network/zabbix_agentd/zabbix_agentd.SlackBuild
+++ b/network/zabbix_agentd/zabbix_agentd.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for zabbix_agentd
-# Copyright 2010-2011 Niels Horn, Rio de Janeiro, RJ, Brazil
+# Copyright 2012 Michal Bialozor, Gdansk, POLAND
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,8 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# revision date 2011/12/30
-
PRGNAM=zabbix_agentd
-VERSION=${VERSION:-1.8.10}
+VERSION=${VERSION:-1.8.15}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -39,10 +37,10 @@ fi
PRGSHORT=zabbix
-ZABBIXUSER=${ZABBIXUSER:-zabbix}
-ZABBIXGROUP=${ZABBIXGROUP:-zabbix}
-ZABBIXUID=${ZABBIXUID:-228}
-ZABBIXGID=${ZABBIXGID:-228}
+ZABBIXUSER=${ZABBIXUSER:-zabbixagent}
+ZABBIXGROUP=${ZABBIXGROUP:-zabbixagent}
+ZABBIXUID=${ZABBIXUID:-266}
+ZABBIXGID=${ZABBIXGID:-266}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
@@ -52,7 +50,7 @@ OUTPUT=${OUTPUT:-/tmp}
set -e
# Bail out if user or group isn't valid on your system
-# For slackbuilds.org, assigned zabbix uid/gid are 228/228
+# For slackbuilds.org, assigned zabbixagent uid/gid are 266/266
# See http://slackbuilds.org/uid_gid.txt
if [ "$(grep ^$ZABBIXUSER: /etc/passwd)" = "" -o "$(grep ^$ZABBIXGROUP: /etc/group)" = "" ] ; then
echo " You must have a \"$ZABBIXGROUP\" group and user to run this script."
@@ -112,7 +110,7 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r
# Initial log file
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
# Dir for pid-file
@@ -120,14 +118,16 @@ mkdir -p $PKG/var/run/$PRGSHORT
chown -R $ZABBIXUSER:$ZABBIXGROUP $PKG/var/run/$PRGSHORT
# Configuration file
-mkdir -p $PKG/etc/$PRGSHORT
+mkdir -p $PKG/etc/$PRGSHORT/zabbix_agentd.conf.d
sed -e "s,# PidFile=/tmp/,PidFile=/var/run/$PRGSHORT/," \
-e "s,LogFile=/tmp/,LogFile=/var/log/$PRGSHORT/," \
- misc/conf/$PRGNAM.conf > $PKG/etc/$PRGSHORT/$PRGNAM.conf.new
+ misc/conf/$PRGNAM.conf > $PKG/etc/$PRGSHORT/$PRGNAM.conf.new
+# Init script
mkdir -p $PKG/etc/rc.d
-cat $CWD/rc.$PRGNAM > $PKG/etc/rc.d/rc.$PRGNAM.new
+sed "s|@ZABBIXUSER@|$ZABBIXUSER|" $CWD/rc.$PRGNAM > $PKG/etc/rc.d/rc.$PRGNAM.new
+# Documentation
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog CREDITS INSTALL NEWS README \
$PKG/usr/doc/$PRGNAM-$VERSION