From 61c53edcaa64ac5b3d2631ff11a6122b8ddf236f Mon Sep 17 00:00:00 2001 From: vados-dev <192440777+vados-dev@users.noreply.github.com> Date: Tue, 5 May 2026 01:30:03 +0300 Subject: [PATCH] Autocommit in repo: ros.vados.ru, generated by owner: root, in 01:30:03 05.05.2026. --- html/AM-GlobalConfig.rsc | 14 ++--- html/AM-GlobalFunc.rsc | 85 +++--------------------------- html/tmp/next/global-functions.rsc | 5 +- 3 files changed, 18 insertions(+), 86 deletions(-) diff --git a/html/AM-GlobalConfig.rsc b/html/AM-GlobalConfig.rsc index aadf5de42..69d4292c0 100644 --- a/html/AM-GlobalConfig.rsc +++ b/html/AM-GlobalConfig.rsc @@ -12,7 +12,7 @@ # Global Url For Amster scripts to fetch # most be defined in AM-Init-Script or AM-setup scripts :global GlobalScriptsUrl "https://ros.vados.ru/"; -:global ScriptsUrlSuffix ""; +:global ScriptsUrlSuffix (a); :global CheckSumsVerify true; :global ScriptUpdatesCRLF true; @@ -69,17 +69,17 @@ :global CertRenewUrl ($GlobalScriptsUrl . "certs/" . $Identity . "/"); :global CertRenewTime 2w; -:global CertRenewPass { - ""; +:global CertRenewPass (a); #{ +# ""; # "v3ry-s3cr3t"; # "4n0th3r-s3cr3t"; -}; +#}; :global CertWarnTime 1w; -:global CertIssuedExportPass { - ""; +:global CertIssuedExportPass (a); # { +# ""; # "cert1-cn"="v3ry-s3cr3t"; # "cert2-cn"="4n0th3r-s3cr3t"; -}; +#}; # Script BackupAndUpdate mode, possible values: backup, # updateOnce - Update once as "osnotify" and back "osnotify" mode (in terminal run :set OSUpdateMode updateOnce; $OSUpdateMode;). diff --git a/html/AM-GlobalFunc.rsc b/html/AM-GlobalFunc.rsc index 1550af9d8..f8009cd86 100644 --- a/html/AM-GlobalFunc.rsc +++ b/html/AM-GlobalFunc.rsc @@ -17,9 +17,9 @@ :global GlobalFuncReady false; # Git commit id & info, expected configuration version -:global CommitId "main/618/22f80b83"; +:global CommitId "main/619/a99e710a"; :global CommitTAG "unknown"; -:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 01:25:02 05.05.2026."; +:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 01:30:03 05.05.2026."; # The variables are received right here. :global GlobalConfVersion 140; @@ -1305,78 +1305,6 @@ :return true; } -# read parts of a large file -# Description of parameters: -# $1 - script name for logging and user agent -# $2 - url to fetch from -# $3 - check-certificate value for /tool/fetch (true/false) -# $4 - mode value for /tool/fetch (optional, e.g. "keep-broken", "https-only", "http-only" -# "no-redirects", "background", "background-and-keep-broken", "background-and-https-only", -# "background-and-http-only", "background-and-no-redirects", "background-and-keep-broken-and-https-only", "background-and-keep-broken-and-http-only", -# "background-and-keep-broken-and-no-redirects") -# $5 - fetch method for /tool/fetch (optional, e.g. "get", "head", "post", "put", "patch", "delete") -#:set FetchLargeFiles do={ -# :local RunName [:tostr $1]; -# :local fetchUrl [:tostr $2]; -# :local fetchFile [:tostr $3]; -# :local CheckCert [:tostr $4]; -# :local fetchMode [:tostr $5]; -# :local fetchMethod [:tostr $6]; -# :local tmpName; -# :global CleanName; -# :global FetchUserAgentStr; -# :global GetRandom20CharAlNum; -# :global IfThenElse; -# :global LogPrint; -# :global MkDir; -# :global RmDir; -# :global RmFile; -# :global WaitForFile; -# -# :set CheckCert [ $IfThenElse ($CheckCert = "false") "no" "yes-without-crl" ]; -# -# :set tmpName ($CleanName "tmp-" . [ $GetRandom20CharAlNum 6 ]); -# :local DirName ("tmpfs/" . $tmpName); -# :if ([ $MkDir $DirName ] = false) do={ -# :log error ($RunName . " Failed creating directory: " . $DirName . "!"); -# :return false; -# } -# -# :local FileName ($DirName . "/" . [ $CleanName $fetchFile ] . "-" . [ $GetRandom20CharAlNum 5 ]); -# :local Url ($fetchUrl . $fetchFile); -# :onerror Err { -# /tool/fetch check-certificate=$CheckCert $Url dst-path=$FileName \ -# http-header-field=({ [ $FetchUserAgentStr $RunName ] }) as-value; -# } do={ -# :if ([ $WaitForFile $FileName 500ms ] = true) do={ -# $RmFile $FileName; -# } -# :log error ($RunName . " Failed downloading from '" . $Url . "' - " . $Err); -# $RmDir $DirName; -# :return false; -# } -# -# :if ([ $WaitForFile $FileName 5s ] = false) do={ -# :log error ($RunName . " The file downloaded from '" . $Url . "' did not show up."); -# :return false; -# } -# -# :local FileSize [ /file/get $FileName size ]; -# :local Return ""; -# :local VarSize 0; -# :while ($VarSize != $FileSize) do={ -# :set Return ($Return . ([ /file/read offset=$VarSize chunk-size=32768 file=$FileName as-value ]->"data")); -# :set FileSize [ /file/get $FileName size ]; -# :set VarSize [ :len $Return ]; -# :if ($VarSize > $FileSize) do={ -# :delay 100ms; -# } -# } -## $RmFile $FileName; -# $RmDir $DirName; -# :return $Return; -#} - :set FetchHugeFiles do={ :local ScriptName [ :tostr $1 ]; :local Url [ :tostr $2 ]; @@ -1680,10 +1608,13 @@ [ $SymbolForNotification "pushpin" "*" ] . $Change); $LogPrint info $0 ("Change " . $I . ": " . $Change); } - } else={:set NotificationMessage ($NotificationMessage . "\n\nNews and changes are not available.")} + } else={ + :set NotificationMessage ($NotificationMessage . "\n\nNews and changes are not available."); + + } - :set GlobalConfChanges; - :set GlobalConfMigration; + :if ([ :len $GlobalConfChanges ] > 0) do={ :set GlobalConfChanges; } else={ :global GlobalConfChanges (a); } + :if ([ :len $GlobalConfMigration ] > 0) do={ :set GlobalConfMigration; } else={ :global GlobalConfMigration (a); } } } do={ :global ExitOnError; $ExitOnError $0 $Err; diff --git a/html/tmp/next/global-functions.rsc b/html/tmp/next/global-functions.rsc index af3f0c287..10a9b5acc 100644 --- a/html/tmp/next/global-functions.rsc +++ b/html/tmp/next/global-functions.rsc @@ -1537,8 +1537,9 @@ subject=([ $SymbolForNotification "pushpin" ] . "News and configuration changes"); \ message=$NotificationMessage; link=$Link }); } - :if ([ :len $GlobalConfigChanges ] > 0) do={ :set GlobalConfigChanges; } else={ :global GlobalConfigChanges (a); } - :if ([ :len $GlobalConfigMigration ] > 0) do={ :set GlobalConfigMigration; } else={ :global GlobalConfigMigration (a); } + + :set GlobalConfigChanges; + :set GlobalConfigMigration; } } do={ :global ExitOnError; $ExitOnError $0 $Err; -- 2.52.0