Public feed #726536

Untitled

public shellscript v1 · immutable
Raw Edit
·published 2007-10-05 09:08 UTC
rendered paste body
# cat 810.ftplogs#!/bin/sh -# Show ftp activity## If there is a global system configuration file, suck it in.#if [ -r /etc/defaults/periodic.conf ]then    . /etc/defaults/periodic.conf    source_periodic_confsfiLOG="${daily_status_security_logdir}"yesterday=`date -v-1d "+%b %e "`catmsgs() {        find ${LOG} -name 'xferlog' -mtime -2 |            sort -t. -r -n -k 2,2 |            while read f            do                case $f in                    *.gz)       zcat -f $f;;                    *.bz2)      bzcat -f $f;;                esac            done        [ -f ${LOG}/xferlog ] && cat $LOG/xferlog}case "$daily_status_security_ftpact_enable" in    [Yy][Ee][Ss])        echo ""        echo "${host} ftp activity:"        n=$(catmsgs | egrep -ia "^$yesterday.*" |            tee /dev/stderr | wc -l)        [ $n -gt 0 ] && rc=1 || rc=0;;    *)  rc=0;;esacexit $rc