?
Solved

Points for Techno__Mage

Posted on 2002-07-20
2
Medium Priority
?
222 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 200 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
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.
Suggested Courses
Course of the Month13 days, 17 hours left to enroll

800 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