Solved

Points for Techno__Mage

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

Sebastian
0
Comment
Question by:sderaadt
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
video edge NVR Device Discovery Problem 4 45
Reset Root Password on CentOS 6 4 53
linux redhat 7.2 10 70
Impact of disabling SMB v1 on Mac and Linux clients 4 326
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

813 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now