❗️Toto je původní verze internetového fóra ISPforum.cz do února 2020 bez možnosti registrace nových uživatelů. Aktivní verzi fóra naleznete na adrese https://telekomunikace.cz

Mikrotik Auto-upgrade

Návody a problémy s konfigurací.
zdwena
Příspěvky: 147
Registrován: 12 years ago

Mikrotik Auto-upgrade

Příspěvekod zdwena » 9 years ago

Ahoj nepsal bych tady (zase) :-) kdybych už nevyčerpal všechno co se podařilo najit a nebyl v koncich.

Chtěl jsem rozjet na mikrotiku auto upgrade na vlastnim serveru aby se nestahovaly z upgrade.mikrotik.com

Podle postupu ktery jsem tady našel jsem to zprovoznil ale...
Když dam zkontrolovat aktualizace tak ikdyž je nainstalovana verze 6.35 a dustupna 6.35 status piše že je nova verze k dispozici...coš je špatně

/system package update> check-for-updates
channel: current
current-version: 6.35
latest-version: 6.35
status: New version is available

a to je špatně protože by měl psat když použiju server mikrotiku:

channel: current
current-version: 6.35
latest-version: 6.35
status: System is already up to date

a vubec netušim proč to tak děla

v rootu mám routeros v tom složku s firmware 6.35 a soubor LATEST.6

Dela to jak na linuxovem a tak windowsovem serveru
0 x

Ragon
Příspěvky: 19
Registrován: 14 years ago
Kontaktovat uživatele:

Příspěvekod Ragon » 9 years ago

Ten stejný problém řeším taky je tam změna od verze 6.31
Kdyby někdo věděl jak to vyřešit bylo by to super.
0 x

zdwena
Příspěvky: 147
Registrován: 12 years ago

Příspěvekod zdwena » 9 years ago

Jsem v koncích prolezl jsem kde co a chybu jsem nenašel..:-(
0 x

blizzy
Příspěvky: 65
Registrován: 19 years ago
Kontaktovat uživatele:

Příspěvekod blizzy » 9 years ago

Zkus - kontroluje i bios:

Kód: Vybrat vše

#
/system script
add name=AutoUpgrade owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive source="
:if ([/system routerboard get current-firmware] != [/system routerboard get upgrade-firmware]) do={
:log error \"Bios need upgrade\";
/system script add name=\"bios-upgrade\" source=\"/system routerboard upgrade\";
/system script run bios-upgrade;
:delay 5;
/system script remove [find name=bios-upgrade];\
:delay 5;\
/system reboot} else={:log warning \"Nothing\"}\

## Notification e-mail
:local email "aktualizace@email.cz"


########## Do the stuff

## Check for update
/system package update
set channel=current
check-for-updates

## Waint on slow connections
:delay 15s;

## Important note: "installed-version" was "current-version" on older Roter OSes
:if ([get installed-version] != [get latest-version]) do={

   ## New version of RouterOS available, let's upgrade
   /tool e-mail send to="$email" subject="Upgrading RouterOS on router $[/system identity get name]" body="Upgrading RouterOS on router $[/system identity get name] from $[/system package update get installed-version] to $[/system package update get latest-version] (channel:$[/system package update get channel])"
   :log info ("Upgrading RouterOS on router $[/system identity get name] from $[/system package update get installed-version] to $[/system package update get latest-version] (channel:$[/system package update get channel])")     

   ## Wait for mail to be send & upgrade
   :delay 15s;
   
   ## "install" command is reincarnation of the "upgrade" command - doing exactly the same but under a different name
   install

} else={

   ## RouterOS latest, let's check for updated firmware
    :log info ("No RouterOS upgrade found, checking for HW upgrade...")

   /system routerboard

   :if ( [get current-firmware] != [get upgrade-firmware]) do={

      ## New version of firmware available, let's upgrade
      /tool e-mail send to="$email" subject="Upgrading firmware on router $[/system identity get name]" body="Upgrading firmware on router $[/system identity get name] from $[/system routerboard get current-firmware] to $[/system routerboard get upgrade-firmware]"
      :log info ("Upgrading firmware on router $[/system identity get name] from $[/system routerboard get current-firmware] to $[/system routerboard get upgrade-firmware]")
     
      ## Wait for mail to be send & upgrade
      :delay 300s;
      upgrade

      ## Wait for upgrade, then reboot
      :delay 180s;
      /system reboot

   } else={

   :log info ("No Router HW upgrade found")

   }

}
0 x

zdwena
Příspěvky: 147
Registrován: 12 years ago

Příspěvekod zdwena » 9 years ago

Aaa děkuji vyzkouším neco takového jsem hledal...:-)
0 x