mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-07-23 20:34:30 +02:00
check-routeros-update: use custom user agent string
This commit is contained in:
parent
cd371b69a6
commit
079249f3d7
1 changed files with 3 additions and 1 deletions
|
@ -24,6 +24,7 @@
|
|||
|
||||
:global DeviceInfo;
|
||||
:global EscapeForRegEx;
|
||||
:global FetchUserAgent;
|
||||
:global LogPrint;
|
||||
:global ScriptFromTerminal;
|
||||
:global ScriptLock;
|
||||
|
@ -108,7 +109,8 @@
|
|||
:do {
|
||||
:set Result [ /tool/fetch check-certificate=yes-without-crl \
|
||||
($SafeUpdateUrl . $Update->"channel" . "?installed=" . $Update->"installed-version" . \
|
||||
"&latest=" . $Update->"latest-version") output=user as-value ];
|
||||
"&latest=" . $Update->"latest-version") http-header-field=({ [ $FetchUserAgent $ScriptName ] }) \
|
||||
output=user as-value ];
|
||||
} on-error={
|
||||
$LogPrint warning $ScriptName ("Failed receiving safe version for " . $Update->"channel" . ".");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue