diff options
author | ArTourter <artourter@gmail.com> | 2019-12-01 08:35:54 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-12-01 08:35:54 +0700 |
commit | dd871037872db40d89ee41b89d964686ae2cc92b (patch) | |
tree | 276556c264b79738255789fdffca7ec6861531ce /system | |
parent | 69a4bb0fa8180976590677e4e5d3f097a36dcd27 (diff) | |
download | slackbuilds-dd871037872db40d89ee41b89d964686ae2cc92b.tar.gz |
system/logwatch: Added (a customizable log analysis system).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/logwatch/README | 5 | ||||
-rw-r--r-- | system/logwatch/doinst.sh | 18 | ||||
-rw-r--r-- | system/logwatch/logwatch.SlackBuild | 112 | ||||
-rw-r--r-- | system/logwatch/logwatch.info | 10 | ||||
-rw-r--r-- | system/logwatch/slack-desc | 19 |
5 files changed, 164 insertions, 0 deletions
diff --git a/system/logwatch/README b/system/logwatch/README new file mode 100644 index 0000000000..2d194d0dfc --- /dev/null +++ b/system/logwatch/README @@ -0,0 +1,5 @@ +Logwatch is a customizable log analysis system. + +Logwatch parses through your system's logs and creates a report analyzing +areas that you specify. Logwatch is easy to use and will work right out of the +package on most systems. diff --git a/system/logwatch/doinst.sh b/system/logwatch/doinst.sh new file mode 100644 index 0000000000..a377eaacde --- /dev/null +++ b/system/logwatch/doinst.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +config() { + NEW="$1" + OLD="${NEW%*.new}" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/logwatch/conf/logwatch.conf.new +config etc/logwatch/conf/ignore.conf.new +config etc/logwatch/conf/override.conf.new + diff --git a/system/logwatch/logwatch.SlackBuild b/system/logwatch/logwatch.SlackBuild new file mode 100644 index 0000000000..eec9954933 --- /dev/null +++ b/system/logwatch/logwatch.SlackBuild @@ -0,0 +1,112 @@ +#!/bin/bash + +# Slackware build script for logwatch + +# Copyright (c) 2019 Gregory J.L. Tourte <artourter@gmail.com> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=logwatch +VERSION=${VERSION:-7.5.2} +BUILD=${BUILD:-1} +ARCH=noarch +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . + +install -m 0755 -d $PKG/var/cache/logwatch +install -m 0755 -d $PKG/etc/logwatch/scripts +install -m 0755 -d $PKG/etc/logwatch/scripts/services +install -m 0755 -d $PKG/etc/logwatch/conf +install -m 0755 -d $PKG/etc/logwatch/conf/logfiles +install -m 0755 -d $PKG/etc/logwatch/conf/services +install -m 0755 -d $PKG/usr/share/logwatch/default.conf/logfiles +install -m 0755 -d $PKG/usr/share/logwatch/default.conf/services +install -m 0755 -d $PKG/usr/share/logwatch/default.conf/html +install -m 0755 -d $PKG/usr/share/logwatch/dist.conf/logfiles +install -m 0755 -d $PKG/usr/share/logwatch/dist.conf/services +install -m 0755 -d $PKG/usr/share/logwatch/scripts/services +install -m 0755 -d $PKG/usr/share/logwatch/scripts/shared +install -m 0755 -d $PKG/usr/share/logwatch/lib + +install -m 0755 scripts/logwatch.pl $PKG/usr/share/logwatch/scripts/logwatch.pl + +for i in $( find scripts/logfiles/* -type d -not -empty ) +do + echo "creating folder $PKG/usr/share/logwatch/$i" + install -m 0755 -d $PKG/usr/share/logwatch/$i + install -m 0755 $i/* $PKG/usr/share/logwatch/$i +done + +install -m 0755 scripts/services/* $PKG/usr/share/logwatch/scripts/services +install -m 0755 scripts/shared/* $PKG/usr/share/logwatch/scripts/shared +install -m 0755 lib/* $PKG/usr/share/logwatch/lib + +install -m 0644 conf/*.conf $PKG/usr/share/logwatch/default.conf +install -m 0644 conf/logfiles/* $PKG/usr/share/logwatch/default.conf/logfiles +install -m 0644 conf/services/* $PKG/usr/share/logwatch/default.conf/services +install -m 0644 conf/html/* $PKG/usr/share/logwatch/default.conf/html + +install -m 0755 -d $PKG/usr/man/man1 +install -m 0644 amavis-logwatch.1 $PKG/usr/man/man1 +install -m 0644 postfix-logwatch.1 $PKG/usr/man/man1 +install -m 0755 -d $PKG/usr/man/man5 +install -m 0644 ignore.conf.5 $PKG/usr/man/man5 +install -m 0644 logwatch.conf.5 $PKG/usr/man/man5 +install -m 0644 override.conf.5 $PKG/usr/man/man5 +install -m 0755 -d $PKG/usr/man/man8 +install -m 0644 logwatch.8 $PKG/usr/man/man8 + +install -m 0755 -d $PKG/etc/cron.daily +ln -s /usr/share/logwatch/scripts/logwatch.pl $PKG/etc/cron.daily/0logwatch +install -m 0755 -d $PKG/usr/sbin +ln -s /usr/share/logwatch/scripts/logwatch.pl $PKG/usr/sbin/logwatch + +# Using Alienbob's default configuration files +echo "###### REGULAR EXPRESSIONS IN THIS FILE WILL BE TRIMMED FROM REPORT OUTPUT #####" > $PKG/etc/logwatch/conf/ignore.conf.new +echo "# Local configuration options go here (defaults are in /usr/share/logwatch/default.conf/logwatch.conf)" > $PKG/etc/logwatch/conf/logwatch.conf.new +echo "# Configuration overrides for specific logfiles/services may be placed here." > $PKG/etc/logwatch/conf/override.conf.new + +find $PKG/usr/man -type f -exec gzip -9 {} \; + +DOCS="HOWTO-Customize-LogWatch LICENSE README" + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/logwatch/logwatch.info b/system/logwatch/logwatch.info new file mode 100644 index 0000000000..cb74a8bc74 --- /dev/null +++ b/system/logwatch/logwatch.info @@ -0,0 +1,10 @@ +PRGNAM="logwatch" +VERSION="7.5.2" +HOMEPAGE="http://www.logwatch.org" +DOWNLOAD="https://downloads.sourceforge.net/project/logwatch/logwatch-7.5.2/logwatch-7.5.2.tar.gz" +MD5SUM="634b2ac423b77b809d400cc6085db49d" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="ArTourter" +EMAIL="artourter@gmail.com" diff --git a/system/logwatch/slack-desc b/system/logwatch/slack-desc new file mode 100644 index 0000000000..089a738043 --- /dev/null +++ b/system/logwatch/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +logwatch: Logwatch (a customizable log analysis system) +logwatch: +logwatch: Logwatch parses through your system's logs for a given period of +logwatch: time and creates a report analyzing areas that you specify, in as +logwatch: much detail as you require. Logwatch is easy to use and will work +logwatch: right out of the package on most systems. +logwatch: +logwatch: +logwatch: +logwatch: Project home: http://www.logwatch.org/ +logwatch: |