
а статейка моя http://www.lissyara.su/articles/freebsd ... 2_mirror2/ до сих пор актуальна , недавно настроил на одном сервачке, взлетело без проблем)))
Код: Выделить всё
Using um15.eset.com/eset_upd...
--2012-06-19 14:43:27-- http://um15.eset.com/eset_upd/update.ver
Resolving um15.eset.com... 62.67.184.68
Connecting to um15.eset.com|62.67.184.68|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8809 (8.6K) [application/octet-stream]
Saving to: `//eset_upd/update.ver'
100%[==============================================================================================================================>] 8,809 --.-K/s in 0.1s
2012-06-19 14:43:27 (74.5 KB/s) - `//eset_upd/update.ver' saved [8809/8809]
UNRAR 3.80 beta 2 freeware Copyright (c) 1993-2008 Alexander Roshal
Extracting from /eset_upd/update.ver
Extracting update.ver OK
All OK
Couldn't open /eset_upd.ver for reading: No such file or directory
Код: Выделить всё
#$PATH = "/usr/local/www/data3"; # papka hraneniya zerkala
#$TMP = "/usr/local/www/data3/tmp"; # papka hraneniya vremennix failov
# servers obnovleniya
%servers = (
#'ddn.org.ua:9999'
#'90.183.101.10'
'um15.eset.com'
#'http://update.eset.com'
#'http://89.202.149.36'
#'http://u50.eset.com'
#'http://u21.eset.com'
#'http://r-s.selfip.com'
);
#%versions = ("nod_upd","eset_upd"); # version nod32 staroe
%versions = ("eset_upd"); # version nod32
foreach $URL_UPD (%servers)
{
if($URL_UPD)
{
foreach $NUPD (%versions)
{
if($NUPD)
{
print "Using $URL_UPD/$NUPD...\n";
unlink("$TMP/$NUPD.ver","$PATH/$NUPD/update.ver");
download($PATH,"$URL_UPD/$NUPD/update.ver","/$NUPD/update.ver",$LOGIN,$PASS);
system("/usr/local/bin/unrar e -y $PATH/$NUPD/update.ver $TMP");
rename("$TMP/update.ver","$TMP/$NUPD.ver");
$ver = "$TMP/$NUPD.ver";
open(VER, "< $ver") or die "Couldn't open $ver for reading: $!\n";
%files = ();
%urls = ();
$end = 0;
while (defined($line = <VER>) )
{
chomp $line;
if ($line =~ /COMPATLIST/)
{
$end = 1;
}
if ($end == 0)
{
($par,$val) = split /=/, $line;
$val = substr($val, 0, -1);
if ($par =~ /file/ )
{
$name = $val;
$furl = "$URL_UPD$val";
$line = "file=$name";
}
if ($par =~/size/ )
{
$size = $val;
$files{$name} = $size;
$urls{$name} = "$furl";
}
}
}
print "\n";
close(VER);
foreach $f (keys %files)
{
if ((-s "$PATH$f") != $files{$f})
{
$size = (-s "$PATH$f");
print "$URL_UPD/$NUPD Not present --> $PATH$f\t$f\t$files{$f} ---> $size\n";
unlink("$PATH$f");
download($PATH,$urls{$f},$f,$LOGIN,$PASS);
}
else
{
print "$URL_UPD/$NUPD Present --> $PATH$f\t$f\t$files{$f}\n";
}
}
chmod(0644,"$PATH/*");
sub download()
{
my ($path, $url, $f, $login, $pass) = @_;
$dir = $f;
$dir =~s/^(.*)\/(.*)$/$1/;
system("mkdir -p $path/$dir");
system("/usr/local/bin/wget -P $path/$dir --proxy-user=user --http-user=$login --http-password=$pass $url");
}
}
}
}
}
gonzo111 писал(а):во вложении последняя 100% рабочая версия скрипта из моей статьи
http://www.lissyara.su/articles/freebsd ... 2_mirror2/![]()
- подправлены переменные сервера откуда обновляться
- переменная имени файла для проверки при поиске ключа
Код: Выделить всё
nod.sh: use: not found
nod.sh: use: not found
nod.sh: use: not found
nod.sh: /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin: not found
nod.sh: =: not found
nod.sh: =: not found
nod.sh: 12: Syntax error: ";" unexpected
Код: Выделить всё
--2012-11-23 06:44:47-- http://update.eset.com/eset_upd/update.ver
Resolving update.eset.com... 62.67.184.76, 62.67.184.81, 89.202.149.49, ...
Connecting to update.eset.com|62.67.184.76|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9806 (9.6K) [application/octet-stream]
Saving to: `/usr/local/www/apache22/data/nod_update/eset_upd/update.ver'
100%[===================================================================================================================>] 9,806 --.-K/s in 0.1s
2012-11-23 06:44:48 (64.2 KB/s) - `/usr/local/www/apache22/data/nod_update/eset_upd/update.ver' saved [9806/9806]
--2012-11-23 06:44:51-- http://um10.eset.com/eset_upd/update.ver
Resolving um10.eset.com... 93.184.71.21
Connecting to um10.eset.com|93.184.71.21|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9806 (9.6K) [application/octet-stream]
Saving to: `/usr/local/www/apache22/data/nod_update/eset_upd/update.ver'
100%[===================================================================================================================>] 9,806 --.-K/s in 0.1s
2012-11-23 06:44:51 (76.4 KB/s) - `/usr/local/www/apache22/data/nod_update/eset_upd/update.ver' saved [9806/9806]
--2012-11-23 06:44:54-- http://um11.eset.com/eset_upd/update.ver
Resolving um11.eset.com... 93.184.71.27
Connecting to um11.eset.com|93.184.71.27|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9806 (9.6K) [application/octet-stream]
Saving to: `/usr/local/www/apache22/data/nod_update/eset_upd/update.ver'
100%[===================================================================================================================>] 9,806 --.-K/s in 0.1s
2012-11-23 06:44:54 (76.0 KB/s) - `/usr/local/www/apache22/data/nod_update/eset_upd/update.ver' saved [9806/9806]
--2012-11-23 06:44:57-- http://um12.eset.com/eset_upd/update.ver
Resolving um12.eset.com... 89.202.157.226
Connecting to um12.eset.com|89.202.157.226|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9806 (9.6K) [application/octet-stream]
Saving to: `/usr/local/www/apache22/data/nod_update/eset_upd/update.ver'
100%[===================================================================================================================>] 9,806 --.-K/s in 0.1s
2012-11-23 06:44:58 (85.9 KB/s) - `/usr/local/www/apache22/data/nod_update/eset_upd/update.ver' saved [9806/9806]
--2012-11-23 06:45:01-- http://um14.eset.com/eset_upd/update.ver
Resolving um14.eset.com... 62.67.184.70
Connecting to um14.eset.com|62.67.184.70|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9806 (9.6K) [application/octet-stream]
Saving to: `/usr/local/www/apache22/data/nod_update/eset_upd/update.ver'
100%[===================================================================================================================>] 9,806 --.-K/s in 0.1s
2012-11-23 06:45:01 (64.0 KB/s) - `/usr/local/www/apache22/data/nod_update/eset_upd/update.ver' saved [9806/9806]
--2012-11-23 06:45:04-- http://um16.eset.com/eset_upd/update.ver
Resolving um16.eset.com... 93.184.71.10
Connecting to um16.eset.com|93.184.71.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9806 (9.6K) [application/octet-stream]
Saving to: `/usr/local/www/apache22/data/nod_update/eset_upd/update.ver'
100%[===================================================================================================================>] 9,806 --.-K/s in 0.1s
2012-11-23 06:45:04 (72.2 KB/s) - `/usr/local/www/apache22/data/nod_update/eset_upd/update.ver' saved [9806/9806]
такая же фигняkazan писал(а):У меня все качает нормально, а нод обновляться не хочет, пишет «Файл на сервере ненайден»
у меня 7706RAGNAR писал(а): мож они новые сервера ввели? у меня последнее удачное обновление 7716 как у других?
unrar-4.20_1,5RAGNAR писал(а):есть идей??? у меня unrar 3.93 мож версия поновее нужна?
Код: Выделить всё
UNRAR 3.91 freeware Copyright (c) 1993-2009 Alexander Roshal