Skip to content

Commit

Permalink
Upd
Browse files Browse the repository at this point in the history
  • Loading branch information
marat2509 committed Mar 12, 2024
1 parent 9150cb0 commit 23bb835
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 119 deletions.
2 changes: 0 additions & 2 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ FROM nginx:mainline-alpine
WORKDIR /app
COPY default.conf /etc/nginx/conf.d/default.conf
COPY entrypoint.sh .
COPY healthcheck.sh .
ENTRYPOINT ["/bin/sh", "/app/entrypoint.sh"]
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD ["/bin/sh", "healthcheck.sh"]
9 changes: 3 additions & 6 deletions nod32ms.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ unrar_binary = "C:\unrar.exe"
debug_update = 0

; Method for linking files
; auto - autodetect for current OS
; hardlink_php - link() php function for create hard link
; hardlink_fsutil - WinNT fsutil for create hard link
; hardlink_ln - Unix ln for create hard link
; symlink_php - symlink() php function for create symbolic link
; symlink_ln - Unix ln for create symbolic link
link_method = "auto"
; copy - copy() php function for create copy of file, default method
link_method = "hardlink_php"

; Generate index.html file and put it into the root of www directory.
; It will have: correct database version, size and date of successful update.
Expand Down Expand Up @@ -203,7 +200,7 @@ errors_quantity = 5
mirror = "update.eset.com, um01.eset.com, um02.eset.com, um03.eset.com, um04.eset.com, um05.eset.com, um06.eset.com, um07.eset.com, um08.eset.com, um09.eset.com, um10.eset.com, um11.eset.com, um13.eset.com, um21.eset.com, um23.eset.com"

; Eset versions
versionv3 = 0 ; v3-8
versionv3 = 0 ; v3-9
versionv10 = 0 ; v10-13
versionv14 = 0 ; v14
versionv15 = 0 ; v15
Expand Down
43 changes: 0 additions & 43 deletions worker/core/inc/classes/Config.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,49 +168,6 @@ static private function check_config()
if (!is_writable(static::$CONF['LOG']['dir'])) throw new ConfigException("Log directory is not writable. Check your permissions!");

if (!is_writable(static::$CONF['SCRIPT']['web_dir'])) throw new ConfigException("Web directory is not writable. Check your permissions!");


if (empty(static::$CONF['SCRIPT']['link_method']) || static::$CONF['SCRIPT']['link_method'] == "auto") {
// Link test
$linktestfile = Tools::ds(static::$CONF['LOG']['dir'], LINKTEST);
$test = false;
$status = false;

if (file_exists($linktestfile)) {
$status = file_get_contents($linktestfile);

if (preg_match("/symlink_php|hardlink_fsutil|false/", $status)) $test = true;
}
if ($test == false) {
file_put_contents(Tools::ds(static::$CONF['SCRIPT']['web_dir'], 'linktest'), '');

if (
function_exists('symlink') &&
symlink(
Tools::ds(static::$CONF['SCRIPT']['web_dir'], 'linktest'),
Tools::ds(static::$CONF['SCRIPT']['web_dir'], 'linktest2')
)
) {
$status = 'symlink_php';
} elseif (
preg_match("/^win/i", PHP_OS) &&
shell_exec(
sprintf(
"fsutil hardlink create %s %s",
Tools::ds(static::$CONF['SCRIPT']['web_dir'], 'linktest'),
Tools::ds(static::$CONF['SCRIPT']['web_dir'], 'linktest2'))
) != 0
) {
$status = 'hardlink_fsutil';
} else $status = 'false';

if ($status) unlink(Tools::ds(static::$CONF['SCRIPT']['web_dir'], 'linktest2'));

unlink(Tools::ds(static::$CONF['SCRIPT']['web_dir'], 'linktest'));
@file_put_contents($linktestfile, $status);
}
static::$CONF['SCRIPT']['link_method'] = ($status != 'false' ? $status : false);
}
}

/**
Expand Down
12 changes: 0 additions & 12 deletions worker/core/inc/classes/Mirror.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -655,22 +655,10 @@ static public function create_links($dir, $new_files)
link($result, $path);
Log::write_log(Language::t("Created hard link for %s", basename($array['file'])), 3, static::$version);
break;
case 'hardlink_fsutil':
shell_exec(sprintf("fsutil hardlink create %s %s", $path, $result));
Log::write_log(Language::t("Created hard link for %s", basename($array['file'])), 3, static::$version);
break;
case 'hardlink_ln':
shell_exec(sprintf("ln -f %s %s", $result, $path));
Log::write_log(Language::t("Created hard link for %s", basename($array['file'])), 3, static::$version);
break;
case 'symlink_php':
symlink($result, $path);
Log::write_log(Language::t("Created symbolic link for %s", basename($array['file'])), 3, static::$version);
break;
case 'symlink_ln':
shell_exec(sprintf("ln -fs %s %s", $result, $path));
Log::write_log(Language::t("Created symbolic link for %s", basename($array['file'])), 3, static::$version);
break;
case 'copy':
default:
copy($result, $path);
Expand Down
22 changes: 11 additions & 11 deletions worker/core/inc/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,57 +31,57 @@
'ep6' => [
'file' => 'eset_upd/ep6.6/update.ver',
'dll' => 'eset_upd/ep6.6/dll/update.ver',
'name' => 'ESET NOD32 Endpoint Ver. 6'
'name' => 'ESET NOD32 Endpoint 6'
],
'ep7' => [
'file' => 'eset_upd/ep7/update.ver',
'dll' => 'eset_upd/ep7/dll/update.ver',
'name' => 'ESET NOD32 Endpoint Ver. 7'
'name' => 'ESET NOD32 Endpoint 7'
],
'ep8' => [
'file' => 'eset_upd/ep8/update.ver',
'dll' => 'eset_upd/ep8/dll/update.ver',
'name' => 'ESET NOD32 Endpoint Ver. 8'
'name' => 'ESET NOD32 Endpoint 8'
],
'ep9' => [
'file' => 'eset_upd/ep9/update.ver',
'dll' => 'eset_upd/ep9/dll/update.ver',
'name' => 'ESET NOD32 Endpoint Ver. 9'
'name' => 'ESET NOD32 Endpoint 9'
],
'ep10' => [
'file' => 'eset_upd/ep10/update.ver',
'dll' => 'eset_upd/ep10/dll/update.ver',
'name' => 'ESET NOD32 Endpoint Ver. 10'
'name' => 'ESET NOD32 Endpoint 10'
],
'ep11' => [
'file' => 'eset_upd/ep11/update.ver',
'dll' => 'eset_upd/ep11/dll/update.ver',
'name' => 'ESET NOD32 Endpoint Ver. 11'
'name' => 'ESET NOD32 Endpoint 11'
],
'v3' => [
'file' => 'eset_upd/update.ver',
'dll' => false,
'name' => 'ESET NOD32 Ver. 3-4, 6-8'
'name' => 'ESET NOD32 3-8'
],
'v10' => [
'file' => 'eset_upd/v10/update.ver',
'dll' => false,
'name' => 'ESET NOD32 Ver. 10-11'
'name' => 'ESET NOD32 10-13'
],
'v14' => [
'file' => 'eset_upd/v14/update.ver',
'dll' => 'eset_upd/v14/dll/update.ver',
'name' => 'ESET NOD32 Ver. 14'
'name' => 'ESET NOD32 14'
],
'v15' => [
'file' => 'eset_upd/v15/update.ver',
'dll' => 'eset_upd/v15/dll/update.ver',
'name' => 'ESET NOD32 Ver. 15'
'name' => 'ESET NOD32 15'
],
'v16' => [
'file' => 'eset_upd/v16/update.ver',
'dll' => 'eset_upd/v16/dll/update.ver',
'name' => 'ESET NOD32 Ver. 16-17'
'name' => 'ESET NOD32 16-17'
]
];

15 changes: 0 additions & 15 deletions worker/core/langpacks/en.lng
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
ESET NOD32 Endpoint Ver. 6
ESET NOD32 Endpoint Ver. 7
ESET NOD32 Endpoint Ver. 8
ESET NOD32 Endpoint Ver. 9
ESET NOD32 Endpoint Ver. 10
ESET NOD32 Endpoint Ver. 11
ESET NOD32 Ver. 3-4, 6-8
ESET NOD32 Ver. 5
ESET NOD32 Ver. 9
ESET NOD32 Ver. 10-11
ESET NOD32 Ver. 12
ESET NOD32 Ver. 13
ESET NOD32 Ver. 14
ESET NOD32 Ver. 15
ESET NOD32 Ver. 16-17
This script doesn't support your OS. Please, contact developer!
Running %s
Log file was cutted due rotation...
Expand Down
15 changes: 0 additions & 15 deletions worker/core/langpacks/ru.lng
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
ESET NOD32 Endpoint 6
ESET NOD32 Endpoint 7
ESET NOD32 Endpoint 8
ESET NOD32 Endpoint 9
ESET NOD32 Endpoint 10
ESET NOD32 Endpoint 11
ESET NOD32 3-4, 6-8
ESET NOD32 5
ESET NOD32 9
ESET NOD32 10-11
ESET NOD32 12
ESET NOD32 13
ESET NOD32 14
ESET NOD32 15
ESET NOD32 16-17
Этот скрипт не поддерживает вашу ОС. Пожалуйста, свяжитесь с разработчиком!
Выполнение %s
Лог-файл был очищен из-за ротации...
Expand Down
15 changes: 0 additions & 15 deletions worker/core/langpacks/ukr.lng
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
ESET NOD32 Endpoint 6
ESET NOD32 Endpoint 7
ESET NOD32 Endpoint 8
ESET NOD32 Endpoint 9
ESET NOD32 Endpoint 10
ESET NOD32 Endpoint 11
ESET NOD32 3-4, 6-8
ESET NOD32 5
ESET NOD32 9
ESET NOD32 10-11
ESET NOD32 12
ESET NOD32 13
ESET NOD32 14
ESET NOD32 15
ESET NOD32 16-17
Цей скрипт не підтримує вашу ОС. Будь ласка, зв'яжіться з розробником!
Виконання %s
Лог-файл було очищено через ротацію...
Expand Down

0 comments on commit 23bb835

Please sign in to comment.