X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=lfs%2Flogwatch;h=ac2585b788499e5221093f6be0299028fd78f100;hp=406e1db861297934fa1d66aeba34e7f26f7ce801;hb=9fe72c5267c3ccf21e6a66e035adeb029d660278;hpb=81a7e7c85e61da1f276ee020f7abb0f4649159b7 diff --git a/lfs/logwatch b/lfs/logwatch index 406e1db861..ac2585b788 100644 --- a/lfs/logwatch +++ b/lfs/logwatch @@ -1,22 +1,20 @@ ############################################################################### -# This file is part of the IPCop Firewall. # # # -# IPCop is free software; you can redistribute it and/or modify # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # +# the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # -# IPCop is distributed in the hope that it will be useful, # +# This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # -# along with IPCop; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# # -# Makefiles are based on LFSMake, which is # -# Copyright (C) 2002 Rod Roard # +# along with this program. If not, see . # # # ############################################################################### @@ -26,10 +24,10 @@ include Config -VER = 7.3.1 +VER = 7.3.6 -THISAPP = logwatch_$(VER) -DL_FILE = $(THISAPP).orig.tar.gz +THISAPP = logwatch-$(VER) +DL_FILE = $(THISAPP).tar.gz DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/logwatch-$(VER) TARGET = $(DIR_INFO)/$(THISAPP) @@ -42,7 +40,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_MD5 = c43a783e791ad4851f44c6af98d71b38 +$(DL_FILE)_MD5 = 937d982006b2a76a83edfcfd2e5a9d7d install : $(TARGET) @@ -72,41 +70,35 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) - -mkdir -p /etc/log.d /var/log/logwatch - chown logwatch:nobody /var/log/logwatch - cd $(DIR_APP) && cp -Rf conf scripts lib /etc/log.d - cd $(DIR_APP) && install -m 0755 scripts/logwatch.pl /etc/log.d/scripts/logwatch.pl - cd $(DIR_APP) && install -m 0644 logwatch.8 /usr/share/man/man8 - sed -i 's/^Print = .*$$/Print = Yes/' /etc/log.d/conf/logwatch.conf + cd $(DIR_APP) && sed -e "s/^TEMPDIR=.*/TEMPDIR=\"\/tmp\"/g" -i install_logwatch.sh + @cd $(DIR_APP) && chmod 755 install_logwatch.sh + cd $(DIR_APP) && yes "" | ./install_logwatch.sh + + #sed -i 's/^Print = .*$$/Print = Yes/' /etc/log.d/conf/logwatch.conf # comment out line with unused example - sed -i '/-zz-network/s/Service/#Service/' /etc/log.d/conf/logwatch.conf - # fix typo in output - sed -i '/MB transfered/s/transfered/transferred/' /etc/log.d/scripts/services/http + #sed -i '/-zz-network/s/Service/#Service/' /etc/log.d/conf/logwatch.conf # Strip out some filters for services we don't run - no point wasting log keeping them # cron filter don't support fcron # final selection for remaining files is in rootfile - UNNEEDED="afpd amavis arpwatch audit automount autorpm cisco \ - courier emerge exim extreme-networks ftpd-messages ftpd-xferlog \ - identd in.qpopper ipop3d mountd named netopia netscreen \ - oidentd pam_pwdb portsentry pound pureftp \ - pureftpd qmail rt314 sendmail-largeboxes shaperd smartd \ - sonicwall stunnel tac_acc up2date vpopmail vsftpd windows xferlog yum zz-fortune" && \ - for i in $$UNNEEDED ; do \ - rm -f /etc/log.d/{conf,scripts}/services/$$i{,.conf} /etc/log.d/conf/logfiles/$$i.conf; \ - done - rm -rf /etc/log.d/scripts/logfiles - cp -f $(DIR_SRC)/config/logwatch/dialup /etc/log.d/scripts/services/dialup - cp -f $(DIR_SRC)/config/logwatch/dialup.conf /etc/log.d/conf/services/dialup.conf - - sed -i 's/df -h/df -h -x rootfs/' /etc/log.d/scripts/services/zz-disk_space - for i in `find /etc/log.d -type f`; do \ - sed -i 's/perl -w/perl/' $$i; \ - done - # The httpd log checker script considers any request containing the word - # null to be an exploit attempt, reverse this behaviour as we have a - # null.gif - sed -i -e "/ 'null',/d" /etc/log.d/scripts/services/http - chmod -R 755 /etc/log.d + #UNNEEDED="afpd amavis arpwatch audit automount autorpm cisco \ + # courier emerge exim extreme-networks ftpd-messages ftpd-xferlog \ + # identd in.qpopper ipop3d mountd named netopia netscreen \ + # oidentd pam_pwdb portsentry pound pureftp \ + # pureftpd qmail rt314 sendmail-largeboxes shaperd smartd \ + # sonicwall stunnel tac_acc up2date vpopmail vsftpd windows xferlog yum zz-fortune" && \ + # for i in $$UNNEEDED ; do \ + # rm -f /etc/log.d/{conf,scripts}/services/$$i{,.conf} /etc/log.d/conf/logfiles/$$i.conf; \ + # done + cp -f $(DIR_SRC)/config/logwatch/dialup /usr/share/logwatch/scripts/services/dialup + cp -f $(DIR_SRC)/config/logwatch/dialup.conf /usr/share/logwatch/dist.conf/services/dialup.conf + + -mkdir -p /var/cache/logwatch + chmod -v 777 /var/cache/logwatch + -mkdir -p /var/log/logwatch + chmod -v 755 /var/log/logwatch + -rm -rf /etc/logwatch/conf + ln -vsf /usr/share/logwatch/default.config /etc/logwatch/conf + @rm -rf $(DIR_APP) @$(POSTBUILD)