Author Topic: Avast on Ubuntu  (Read 21123 times)

0 Members and 1 Guest are viewing this topic.

vendion

  • Guest
Re: Avast on Ubuntu
« Reply #15 on: August 30, 2007, 03:46:32 AM »
Hmm.  Ok; since I'm a relative noob to Linux/Ubuntu, and I already have cron on my system (at least, ./ apt-get tells me I do...); could you advise where I might go to learn to use it?  I'm not afraid of the CLI, so that's not an issue.

Cheers;

Ed
Cron is installed on every Linux system it is how you get it to run tasks Daily, Weekly, Monthly...  http://linuxhelp.blogspot.com/2005/05/scheduling-tasks-in-linux-using-cron.html This page should tell you all you need to know about Cron and should help you in learning how to use it.

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
Re: Avast on Ubuntu
« Reply #16 on: August 30, 2007, 03:52:55 AM »
I was able to get the GUI to do an Auto update on my openSUSE box with Avast4Linuxworkstation 1.0.8.
Well... the GUI must be opened for the update download. Otherwise, with avast not running, you won't receive an update. And it runs only when the GUI starts, once, not automatically in background.
The best things in life are free.

vendion

  • Guest
Re: Avast on Ubuntu
« Reply #17 on: August 30, 2007, 05:40:56 PM »
That is true, but with out the resident scanner there really is not need to have a cron job that updates the Virus Database if you don't need it.  Really you only need to update Avast before you scan anything, and it is easy to make a shell scrip that will update and then scan using avast in the CLI.
Code: [Select]
#!bin/sh
#avast scanner script - Updates avast's VB then scans the systems HD
echo "Where to scan?"
echo "1. Scan in $HOME"
echo "2. Scan /"
echo "3. Pick where to scan"
read type

if [ $type = 1 ] ; then
   echo "Updating Avast's VB"
   sudo avast-update
   echo "Scanning $HOME"
   sudo avast ~
   sleep 5
    exit
else
  if [ $type = 2 ] ; then
     echo "Updating Avast's VB"
     sudo avast-update
     echo "Scanning /"
     sudo avast /
     sleep 5
     exit
else
  if [ $ type = 3 ] ; then
     echo "Where to scan?"
     read dir
       if [ ! -d $dir ] ; then
       echo "$dir not found, try again"
       echo "Where to scan?"
       read dir
         if [ ! -d $dir ] ; then
         echo "Sorry can't find $dir"
         exit
       else
    echo "Updating Avast's VB"
    sudo avast-update
    echo "Scanning $dir"
    sudo avast $dir
fi
fi
fi
fi
fi
Not really pretty, and that good to look at, made it in about 5 minutes from the top of my head so there may be some problems with it but it should work (Intended it to just be looked at really), but it will get the job done and with some changed it can easily be made into a cron or an alias for the avast command.

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
Re: Avast on Ubuntu
« Reply #18 on: August 30, 2007, 08:58:04 PM »
That is true, but with out the resident scanner there really is not need to have a cron job that updates the Virus Database if you don't need it.  Really you only need to update Avast before you scan anything, and it is easy to make a shell scrip that will update and then scan using avast in the CLI.
You're fully right. Next time I've boot on Linux, if I could, I'll take a look into your script.
The best things in life are free.

vendion

  • Guest
Re: Avast on Ubuntu
« Reply #19 on: August 31, 2007, 03:57:34 PM »
Well I have a bigger version of that script installed on my SUSE box, but when I posted that I was under Windows and could not get to it.  My full version also uses ClamAV, good for testing of false positives, Ok there is some problems with the one that I posted and I am fixing them and posted a fixed version in this post.

Code: [Select]
#! /bin/sh

#avast scanner script - Updates Avast's VB then scans the systems HD
clear
echo "Pick a scan type"
echo "1. scan $USER home dir (Avast scanner)"
echo "2. scan / (Avast scanner)"
echo "3. Choose where to scan (Avast scanner)"
read type

if [ $type = 1 ]; then
   echo "Updating Avast's VB"
   sudo avast-update
   echo "Scanning $HOME"
   sudo avast $HOME
   sleep 5
   exit
else
  if [ $type = 2 ]; then
    echo "Updating Avast's VB"
    sudo avast-update
    echo "Scanning /"
    sudo avast /
    sleep 5
    exit
else
  if [ $type = 3 ]; then
    echo "Where do you want to scan?"
    read dir
    if [ ! -d $dir ] ; then
    echo "Dir or File is not found"
     sleep 5
      clear
        echo "Where do you want to scan?"
         read dir
         if [ ! -d $dir ] ; then
          echo "Dir or File is not found"
          exit
          fi
     else
     
        echo "Updating Avast's VB"
        sudo avast-update
        echo "Scanning $dir"
        sudo avast $dir
        sleep 5
        exit
fi
fi
fi
fi
fi

I tested this one and it works, and yes if any one wants to use this or at least test it out feel free to do so, I posted this here for anyone who wants it.
« Last Edit: August 31, 2007, 03:59:47 PM by vendion »