RouterOS: fetch update file

This commit is contained in:
Steffen Lange 2025-12-03 15:15:54 +01:00
parent e669e188fc
commit c2136667c1
3 changed files with 6 additions and 9 deletions

View file

@ -6,9 +6,8 @@ class MikroTikRouterOS6 extends PatchBase {
$this->patch->setBranch('v6 Stable'); $this->patch->setBranch('v6 Stable');
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://mikrotik.com/download')) { if ($this->fetch('https://upgrade.mikrotik.com/routeros/NEWESTa6.stable')) {
$this->str_crop('id="routeros6"', '</thead>'); return $this->parse('/([\d\.]+) [\d]+/');
return $this->parse('/<th>([\d\.]+) Stable<\/th>/');
} }
return false; return false;
} }

View file

@ -6,9 +6,8 @@ class MikroTikRouterOS6LTS extends PatchBase {
$this->patch->setBranch('v6 Long-term'); $this->patch->setBranch('v6 Long-term');
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://mikrotik.com/download')) { if ($this->fetch('https://upgrade.mikrotik.com/routeros/NEWESTa6.long-term')) {
$this->str_crop('id="routeros6"', '</thead>'); return $this->parse('/([\d\.]+) [\d]+/');
return $this->parse('/<th>([\d\.]+) Long-[Tt]erm<\/th>/');
} }
return false; return false;
} }

View file

@ -6,9 +6,8 @@ class MikroTikRouterOS7 extends PatchBase {
$this->patch->setBranch('v7 Stable'); $this->patch->setBranch('v7 Stable');
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://mikrotik.com/download')) { if ($this->fetch('https://upgrade.mikrotik.com/routeros/NEWESTa7.stable')) {
$this->str_crop('id="routeros7"', '</thead>'); return $this->parse('/([\d\.]+) [\d]+/');
return $this->parse('/<th>([\d\.]+) Stable<\/th>/');
} }
return false; return false;
} }