network/nagios: Updated for version 4.4.6.

Signed-off-by: Mario Preksavec <mario@slackware.hr>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Mario Preksavec 2021-08-14 21:40:58 +02:00 committed by Willy Sudiarto Raharjo
parent 7d864c6816
commit dbc9610098
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
3 changed files with 30 additions and 9 deletions

View File

@ -0,0 +1,13 @@
--- nagios-4.4.6/startup/default-init.in.orig 2020-04-28 22:48:29.000000000 +0200
+++ nagios-4.4.6/startup/default-init.in 2021-07-31 23:32:21.895857400 +0200
@@ -180,6 +180,10 @@
check_config
+ NagiosRunDir=`dirname $NagiosRunFile`
+ mkdir -p $NagiosRunDir
+ chown $NagiosUser:$NagiosGroup $NagiosRunDir
+
if test -f $NagiosRunFile; then
NagiosPID=`head -n 1 $NagiosRunFile`
if status_nagios; then

View File

@ -3,7 +3,7 @@
# Slackware build script for nagios
# Copyright 2009-2013 Niels Horn, Rio de Janeiro, RJ, Brazil
# Copyright 2014, 2015, 2016, 2017 Mario Preksavec, Zagreb, Croatia
# Copyright 2014, 2021 Mario Preksavec, Zagreb, Croatia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -26,7 +26,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=nagios
VERSION=${VERSION:-4.3.4}
VERSION=${VERSION:-4.4.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -115,6 +115,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Fix /var/run usage
patch -p1 <$CWD/default-init.in.diff
CFLAGS="$SLKCFLAGS -w -Wl,--allow-multiple-definition" \
./configure \
--prefix=/usr \
@ -129,6 +132,7 @@ CFLAGS="$SLKCFLAGS -w -Wl,--allow-multiple-definition" \
--with-httpd-conf=/etc/httpd/extra \
--with-checkresult-dir=/var/spool/$PRGNAM \
--with-init-dir=/etc/rc.d \
--with-init-type=sysv \
--with-lockfile=/var/run/nagios/nagios.lock
make all
@ -171,25 +175,29 @@ chmod -R g-w,o-rx $PKG/etc/$PRGNAM
mkdir -p $PKG/var/run/nagios
# Change init script and leave it -x
mv $PKG/etc/init.d $PKG/etc/rc.d
mv $PKG/etc/rc.d/$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new
chmod -x $PKG/etc/rc.d/rc.$PRGNAM.new
# Move documentation to right location
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
Changelog INSTALLING LEGAL LICENSE README THANKS UPGRADING contrib \
$PKG/usr/doc/$PRGNAM-$VERSION
cp -a CONTRIBUTING.md Changelog INSTALLING LEGAL LICENSE README.md \
THANKS UPGRADING contrib $PKG/usr/doc/$PRGNAM-$VERSION
mv $PKG/$DOCROOT/$PRGNAM/docs $PKG/usr/doc/$PRGNAM-$VERSION/html
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
# Move cgi files to their place
mkdir -p $PKG/usr/sbin/$PRGNAM
mv $PKG/usr/sbin/*.cgi $PKG/usr/sbin/$PRGNAM/
# Fixup some ownership and permission issues
chown root:root $PKG/usr/sbin
chown -R root:nagios $PKG/usr/sbin/$PRGNAM
chmod -R 0754 $PKG/usr/sbin/$PRGNAM
chown root:root $PKG/usr/bin
chmod 0755 $PKG/usr/bin
chmod 0755 $PKG/usr/{,s}bin
chown root:nagios $PKG/usr/bin/*
chmod 0754 $PKG/usr/bin/*
chown nagios:nagios $PKG/var/run/$PRGNAM

View File

@ -1,8 +1,8 @@
PRGNAM="nagios"
VERSION="4.3.4"
VERSION="4.4.6"
HOMEPAGE="https://www.nagios.org/"
DOWNLOAD="https://downloads.sourceforge.net/nagios/nagios-4.3.4.tar.gz"
MD5SUM="e2229f9a98c2577d51576daf19713e4d"
DOWNLOAD="https://downloads.sourceforge.net/nagios/nagios-4.4.6.tar.gz"
MD5SUM="ba849e9487e13859381eb117127bfee2"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""