Avast WEBforum

Business Products => Avast Business => Avast Business for Linux => Topic started by: bemular on August 22, 2008, 04:32:51 AM

Title: problem with updates
Post by: bemular on August 22, 2008, 04:32:51 AM
Ubuntu Linux 8.04
libavastengine-4.7.1-i586 (tar.gz)
avast4server-3.0.1-i586 (tar.gz)
No proxy


At the very end of the installation of the engine,

Installer will insert call for virus database update to the crontab now.
This task can be done by avastvpsupdate.sh or avastvpsupdate.pl.
Installer will check which way is suitable for you, and also will try
to download the latest database version. This step might take up to few
minutes under some circumstances, but can be interrupted anytime by
pressing Ctrl-C (in this case, add the line to the crontab manually
and probably fix the problem in /etc/avastvpsupdate.conf).


it does like endlessly installing/updating. I interrupted this
and looked into the avastvpsupdate.conf (config file) and checked the
URL for VpsLocation, where I think it gets this 400.vps file.

VpsLocation=http://files.avast.com/files/latest/

However, browsing this page gives me a Page Not Found redirecting page.
avastvpsupdate.pl gives me the error Can't access host: files.avast.com
avastvpsupdate.sh gives no message and seem endlessly running.

Could all this be outdated? Is there an alternate URL for the updates? I haven't gone yet into installing the server front as I want to make sure this engine updates automatically first.
Title: Re: problem with updates
Post by: bemular on August 22, 2008, 05:33:28 AM
Ok, it seems that the URL http://files.avast.com/files/latest/400.vps works if I downloaded it manually via browser. I suppose it's because of the likely large file size why it was taking that long to continue. I'll try to leave the update (even though it tells nothing) and take a break for awhile. Will post if I find something.
Title: Re: problem with updates
Post by: bemular on August 22, 2008, 07:43:09 AM
Ok, the engine works now. Even the crontab thing was created.
Now, it seems that my avast4server is not working properly.
The avastd (daemonized) could not be started, it looks for avastd in /etc/sysconfig.
Apparently, my Ubuntu Linux doesn't have any sysconfig directory.
Any workarounds here?
Title: Re: problem with updates
Post by: zilog on August 22, 2008, 01:06:39 PM
Ubuntu Linux 8.04
libavastengine-4.7.1-i586 (tar.gz)
avast4server-3.0.1-i586 (tar.gz)
No proxy


At the very end of the installation of the engine,

Installer will insert call for virus database update to the crontab now.
This task can be done by avastvpsupdate.sh or avastvpsupdate.pl.
Installer will check which way is suitable for you, and also will try
to download the latest database version. This step might take up to few
minutes under some circumstances, but can be interrupted anytime by
pressing Ctrl-C (in this case, add the line to the crontab manually
and probably fix the problem in /etc/avastvpsupdate.conf).


it does like endlessly installing/updating. I interrupted this
and looked into the avastvpsupdate.conf (config file) and checked the
URL for VpsLocation, where I think it gets this 400.vps file.

VpsLocation=http://files.avast.com/files/latest/

However, browsing this page gives me a Page Not Found redirecting page.
avastvpsupdate.pl gives me the error Can't access host: files.avast.com
avastvpsupdate.sh gives no message and seem endlessly running.

Could all this be outdated? Is there an alternate URL for the updates? I haven't gone yet into installing the server front as I want to make sure this engine updates automatically first.


Hallo,
iassume yopu used the *.deb package, but then, never-ending loop can't happen here, because:

- there's simply no loop in the script, look:

#!/bin/sh

### some predefined variables

PSH_CRONTAB="crontab"
PSH_TMP="/var/tmp"
PSH_BINDIR="/usr/bin"
PSH_AVASTVPSUPDATE="avastvpsupdate"
PSH_UNIQUE=`date +%h-%m-%y-%H-%M-%S`-$$

### some functions

testcrontabfail()
  {
  PSH_COMMENT=$PSH_DISABLE
  $1 >/dev/null 2>&1
  if [ $? -ne 0 ]
    then
        echo "# Libavastengine installer: testing of $1 failed - if You want to use this script, fix the problem and enabl
e the line below." >>$PSH_TMP/$PSH_UNIQUE
        PSH_COMMENT="#"
    else
        PSH_DISABLE="#"
    fi
  echo "$PSH_COMMENT 0 0,6,12,18 * * * $PSH_BINDIR/$1" >>$PSH_TMP/$PSH_UNIQUE
  }

### set the full path

PATH="/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin"
export PATH

###

if [ "$1" = "configure" ]
    then
        ldconfig
    fi

### update crontab

echo "Installer will insert call for virus database update to the crontab now."
echo "This task can be done by $PSH_AVASTVPSUPDATE.sh or $PSH_AVASTVPSUPDATE.pl."
echo "Installer will check which way is suitable for you, and also will try"
echo "to download the latest database version. This step might take up to few"
echo "minutes under some circumstances, but can be interrupted anytime by"
echo "pressing Ctrl-C (in this case, add the line to the crontab manually"
echo "and probably fix the problem in /etc/avastvpsupdate.conf)."

### try to update the vps

$PSH_CRONTAB -l | grep -v $PSH_AVASTVPSUPDATE >$PSH_TMP/$PSH_UNIQUE

echo "# Line below polls for Avast! update - running $PSH_AVASTVPSUPDATE.pl or $PSH_AVASTVPSUPDATE.sh periodically does th
e job." >>$PSH_TMP/$PSH_UNIQUE

PSH_DISABLE=""

testcrontabfail $PSH_AVASTVPSUPDATE.pl
testcrontabfail $PSH_AVASTVPSUPDATE.sh

$PSH_CRONTAB $PSH_TMP/$PSH_UNIQUE


- the script just calls both scripts and takes the first one that's functional:

sinclair:/home/zilog/u# ./postinst
Installer will insert call for virus database update to the crontab now.
This task can be done by avastvpsupdate.sh or avastvpsupdate.pl.
Installer will check which way is suitable for you, and also will try
to download the latest database version. This step might take up to few
minutes under some circumstances, but can be interrupted anytime by
pressing Ctrl-C (in this case, add the line to the crontab manually
and probably fix the problem in /etc/avastvpsupdate.conf).

sinclair:/home/zilog/u# vi postinst
sinclair:/home/zilog/u# ./postinst
+ PSH_CRONTAB=crontab
+ PSH_TMP=/var/tmp
+ PSH_BINDIR=/usr/bin
+ PSH_AVASTVPSUPDATE=avastvpsupdate
++ date +%h-%m-%y-%H-%M-%S
+ PSH_UNIQUE=Aug-08-08-12-59-28-342
+ PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin
+ export PATH
+ '[' '' = configure ']'
+ echo 'Installer will insert call for virus database update to the crontab now.
'
Installer will insert call for virus database update to the crontab now.
+ echo 'This task can be done by avastvpsupdate.sh or avastvpsupdate.pl.'
This task can be done by avastvpsupdate.sh or avastvpsupdate.pl.
+ echo 'Installer will check which way is suitable for you, and also will try'
Installer will check which way is suitable for you, and also will try
+ echo 'to download the latest database version. This step might take up to few'
to download the latest database version. This step might take up to few
+ echo 'minutes under some circumstances, but can be interrupted anytime by'
minutes under some circumstances, but can be interrupted anytime by
+ echo 'pressing Ctrl-C (in this case, add the line to the crontab manually'
pressing Ctrl-C (in this case, add the line to the crontab manually
+ echo 'and probably fix the problem in /etc/avastvpsupdate.conf).'
and probably fix the problem in /etc/avastvpsupdate.conf).
+ crontab -l
+ grep -v avastvpsupdate
+ echo '# Line below polls for Avast! update - running avastvpsupdate.pl or avas
tvpsupdate.sh periodically does the job.'
+ PSH_DISABLE=
+ testcrontabfail avastvpsupdate.pl
+ PSH_COMMENT=
+ avastvpsupdate.pl
+ '[' 2 -ne 0 ']'
+ echo '# Libavastengine installer: testing of avastvpsupdate.pl failed - if You
 want to use this script, fix the problem and enable the line below.'
+ PSH_COMMENT=#
+ echo '# 0 0,6,12,18 * * * /usr/bin/avastvpsupdate.pl'
+ testcrontabfail avastvpsupdate.sh
+ PSH_COMMENT=
+ avastvpsupdate.sh
+ '[' 0 -ne 0 ']'
+ PSH_DISABLE=#
+ echo ' 0 0,6,12,18 * * * /usr/bin/avastvpsupdate.sh'
+ crontab /var/tmp/Aug-08-08-12-59-28-342
sinclair:/home/zilog/u# 


although under ubuntu, especially 8.04, can happen everything, IMHO you just have slower internet connection, and the downloading attempt just takes a while. interrupt in ctrl-c anytime, it will harm nothing, just add the lines to crontab later manually:

0 0,6,12,18 * * * /usr/bin/avastvpsupdate.pl
OR
 0 0,6,12,18 * * * /usr/bin/avastvpsupdate.sh

The url is http://files.avast.com/files/latest/400.vps, accesses outside are page-not-found, that's correct.

regards,
pc
Title: Re: problem with updates
Post by: bemular on August 26, 2008, 08:08:52 AM
iassume yopu used the *.deb package, but then, never-ending loop can't happen here, because:

Yeah, I realized that when I found out the file was big and it was just taking long to download. Like I said, the engine seem to work now but the daemonized server (avastd) seem not starting right. I manually created the directory sysconfig and placed a copy of avastd in it. The bootup script, well, I probably will make that since the installer didn't seem to create it automatically. I hate it when the init services doesn't start when the machine reboots.
Title: Re: problem with updates
Post by: zilog on August 26, 2008, 10:37:41 AM
iassume yopu used the *.deb package, but then, never-ending loop can't happen here, because:

Yeah, I realized that when I found out the file was big and it was just taking long to download. Like I said, the engine seem to work now but the daemonized server (avastd) seem not starting right. I manually created the directory sysconfig and placed a copy of avastd in it. The bootup script, well, I probably will make that since the installer didn't seem to create it automatically. I hate it when the init services doesn't start when the machine reboots.

the service's starting script is always ready in /etc/init.d (or similar) sysv-init directory. just check whether this script is properly called by your init sequence, when it seems to not start automatically. But, update-rc.d is called (case of *.deb packages) by the postinst script, thus there should be no problem. the same mechanism is in the *.tar.gz package too...

regards,
pc