Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Points for Techno__Mage

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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

636 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