[tools] update.script

Do you like use update.script ?

  • yes, all time

    Votes: 221 69.1%
  • no, some time

    Votes: 44 13.8%
  • some time

    Votes: 55 17.2%

  • Total voters
    320
When i updated clamav to version 0.94.2 finish.

I try to run freshclam or clamscan commands.
Show error below.

freshclam: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory


How to fix it.

Thanks
 
Few more bugs:
Code:
MEMORY="`free -k | grep Mem | awk '{print $2}'`"
Should be:
Code:
MEMORY="`free -b | grep Mem | awk '{print $2}'`"

And:
Code:
perl -pi -e "s#665536000#${MEMORY}" /var/www/html/mrtg/core/mrtg.cfg
Should be:
Code:
perl -pi -e "s#665536000#${MEMORY}#" /var/www/html/mrtg/core/mrtg.cfg
 
Sorry for a 3rd post, but I've found one more bug..
Missing space here:
Code:
perl -pi -e"s#74747118#${total}#" /var/www/html/mrtg/core/mrtg.cfg
Should be:
Code:
perl -pi -e "s#74747118#${total}#" /var/www/html/mrtg/core/mrtg.cfg
And the following code is missing before this line:
Code:
total=0
count=0
for i in `df -kl | grep -v "Filesystem" | awk '{print $2}'`; do total="$total+$i"; count=`expr $count + 1`; done
total=$(echo $total | bc)
And replace:
Code:
MRTGCRON="`cat /etc/crontab | grep '*/5 * * * * root /usr/local/mrtg-2/bin/mrtg /var/www/html/mrtg/core/mrtg.cfg' | wc -l`"
With:
Code:
MRTGCRON="`cat /etc/crontab | grep '/var/www/html/mrtg/core/mrtg.cfg' | wc -l`"
One more change :) In mrtg.cfg change Options[memory] to be:
Code:
Options[memory]: growright,gauge,noinfo
 
Last edited:
Hi,

I was checking the MRTG install (finally some free time) and saw some "problems"

1.- You delete MRTG before everything, it should be after a successfully download, as if it's unavailable etc, you don't lose it.

Code:
rm -rf /usr/local/mrtg-2/

2.- If you have an old MRTG install it won't update it, as it finds files in /var/www/html/mrtg

3.- You add to crontab only if it doesn't exist yet (very nice, as before you ended up with a lot if something failed) yet, you add the "simplified" one without "env LANG=C" before.

4.- I prefered the old style page of MRTG over the new (simplified) one, as it showed average, maximum, etc. (ok this last one is maybe just me)

Thanks a lot Wael for this script!
 
Hi,
1.- You delete MRTG before everything, it should be after a successfully download, as if it's unavailable etc, you don't lose it.

Code:
rm -rf /usr/local/mrtg-2/

I'm work in new update script

2.- If you have an old MRTG install it won't update it, as it finds files in /var/www/html/mrtg

rm -fr /var/www/html/mrtg but all log remove.

3.- You add to crontab only if it doesn't exist yet (very nice, as before you ended up with a lot if something failed) yet, you add the "simplified" one without "env LANG=C" before.

I'm work in new update script

4.- I prefered the old style page of MRTG over the new (simplified) one, as it showed average, maximum, etc. (ok this last one is maybe just me)

you can click like Memory Utilization and you will see
Max Average Current
Used: 560.9 MB (27.2%) 488.9 MB (23.8%) 522.1 MB (25.4%)
Buffers + Cache: 1649.5 MB (80.1%) 1547.0 MB (75.1%) 1536.5 MB (74.6%)

etc,,


Wael
 
imap just doesnt configure!

I've verified /usr/local/imap-2004c1 is there, and have run ./build php - I get no errors. configure2.php shows as below, yet imap does not show in php. Im now totally stuck!

output of php.info:

'./configure' '--prefix=/usr/local/php5' '--enable-force-cgi-redirect' '--enable-fastcgi' '--with-config-file-path=/usr/local/etc/php5/cgi' '--with-curl=/usr/local/lib' '--with-gd' '--with-gettext' '--with-jpeg-dir=/usr/local/lib' '--with-freetype-dir=/usr/local/lib' '--with-kerberos' '--with-openssl' '--with-mcrypt' '--with-mhash' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config' '--with-pdo-mysql=/usr' '--with-pear' '--with-png-dir=/usr/local/lib' '--with-zlib' '--with-zlib-dir=/usr/local/lib' '--enable-zip' '--enable-gd-native-ttf' '--with-iconv=/usr/local' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-mbstring'

output of configure2.php:


#!/bin/sh
./configure \
--with-apxs2 \
--with-curl=/usr/local/lib \
--with-gd \
--enable-gd-native-ttf \
--with-ttf \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-freetype-dir=/usr/local/lib \
--with-kerberos \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-mysql \
--with-mysqli \
--with-pdo-mysql \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--enable-zip \
--with-imap=/usr/local/imap-2004c1 \
--with-iconv=/usr/local \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-mbstring
 
hi all,

upgraded clamAV from 0.90.1 to 0.94.2 with this wonderfull updatescript
however if i go to /usr/bin/ and go
clamscan --version

-bash-3.00# cd /usr/bin
-bash-3.00# clamscan --version
ClamAV 0.90.1/9065/Tue Mar 3 11:43:41 2009

What went wrong here?
also when i do freshclam it says can't change to /var/clamav

Is it possible to remove ClamAV completly from my system and reinstall, and if yes, how?

Thanks for you input
 
Greetings @How - great script mate , always enjoy using it :)

recently though i got this
Code:
# ./update.script OPENSSL
[: /usr/local/updatescript/mirror.conf: unexpected operator
--2009-03-04 20:55:38--  [url]http://tools.web4host.net/mirror.conf.tmp[/url]
Resolving tools.web4host.net... 67.205.112.100
Connecting to tools.web4host.net|67.205.112.100|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1179 (1.2K) [text/plain]
Saving to: `/usr/local/updatescript/mirror.conf'

100%[==========================================================================================>] 1,179       --.-K/s   in 0s      

2009-03-04 20:55:38 (61.9 MB/s) - `/usr/local/updatescript/mirror.conf' saved [1179/1179]

\mirror.conf downloaded.
each time i try to run the same command it redownloads and uncompresses the files - normally np , but openssl still has FIPS crap in it that i need to manually remove from the Makefile. Hence my problem - any ideas?
 
hi all,

upgraded clamAV from 0.90.1 to 0.94.2 with this wonderfull updatescript
however if i go to /usr/bin/ and go
clamscan --version

-bash-3.00# cd /usr/bin
-bash-3.00# clamscan --version
ClamAV 0.90.1/9065/Tue Mar 3 11:43:41 2009

What went wrong here?
also when i do freshclam it says can't change to /var/clamav

Is it possible to remove ClamAV completly from my system and reinstall, and if yes, how?

Thanks for you input

did you install clamav from yum before ?
if yes run this
yum remove clamav
then install again from update script
 
Back
Top