Solved

Points for Techno__Mage

Posted on 2002-07-20
2
218 Views
Last Modified: 2010-04-20
Thanks for your help.

Sebastian
0
Comment
Question by:sderaadt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
Techno__Mage earned 50 total points
ID: 7171024
Thank you for being cool enough to split 'em up.  
Also, if you use f-prot and schedule a system scan during a time the box might be used for other things...  you might want to add "nice " in front of the command that runs it.  
Here's the script I have cron run nightly, if you're interested.  (Sorry, not as well commented as I usually do)...  

#!/bin/bash


# If more than one net interface is "UP", then try to check-updates

if [ `/sbin/ifconfig | grep UP | wc -l` -ge 2 ]; then
        nice /usr/local/f-prot/check-updates.sh -cron
fi


# Run f-prot scanner on entire filesystem

REPORTNAME="/var/log/f-prot/f-prot.day-`date +%d`.log"
EMAIL_ADDR="root user@outside.domain"
EMAIL_SUBJ="F-Prot AntiVirus Report"
OSNAME=`uname -s`

nice /usr/local/bin/f-prot -report=$REPORTNAME -silent -ai -archive -ext -packed /

# Unless f-prot exit code is "0", email report
case "$?" in
        0)
                ;;
        *)
                case "$OSNAME" in
                        Linux)
                                # For mail versions that refuse to read subject header from file input
                                mail -s "$EMAIL_SUBJ" $EMAIL_ADDR < "$REPORTNAME"
                                ;;
                        *)
                                # For mail versions that happily interpret headers from file input
                                echo $EMAIL_SUBJ > "$REPORTNAME".msg
                                echo >> "$REPORTNAME".msg
                                cat $REPORTNAME >> "$REPORTNAME".msg
                                mail $EMAIL_ADDR < $REPORTNAME.msg
                                rm -f "$REPORTNAME".msg > /dev/null
                                ;;
                esac
                ;;
esac

0
 

Author Comment

by:sderaadt
ID: 7171236
Thanks Techno Mage, that script looks good. Unfortunately I havn't had time to look at f-prot yet - but maybe in the next few weeks.

Thanks again

Sebastian
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question