thanks for the script
had to do some things to make it work for me:
add a schedule to trigger it everyday
config the e-mail server propperly cause gmail doesn’t allow any “less secure aplication”
create an “app password” for the mail account for the password section in mkt e-mail settings
and thats it, it works fine, just don’t use ip addres in mkt e-mail settings → server, use gmail-smtp-msa.l.google.com
Care to provide the full working script by chance? I’d enjoy the chance to work through it step by step as I learn scripting.
Script is a full working script.
Gmail have to be setup (not part of the script) (do a search for gmail mikrotik)
Schedule setup takes 1 second.
I can not help you to get out of the bed to turn on the computer…
But will you pass me my slippers? . Seriously, I misread leanfr91’s message and thought he had altered the script some. After rereading I see that is not the case. Thanks for the script and the learning tool. We can work on the bed assistance later.
Hi Jotne,
I have tested your script with RouterOS version 7.7 and this part does not work:
/system license
:set serial [get system-id]
Now it is:
/system license
:set serial [get software-id]
Greetings.
Interesting. This will break several ting if its change a setting like this.
do not mix CHR with regular routerboard…
I’m sorry, but I don’t understand Jotne’s answer.
I mean this: (non system-id)
[admin@MikroTik] /system/license> pr
software-id: XXXX-XXXX
nlevel: 5
features:
That’s all.
BR.
Since you did not write what system this is on, its hard to find the error.
It handles al routerBoard and CHR, but seems to fail on x86 OVA setup.
Will try to fix that.
It is tested on a RB4011, hAP ac2 and hAP ac3.
BR
Again, on RouterBOARD and x86 is software-id (and also serial-number for RouterBOARD only), both on v7 and previous versions
On CHR is system-id
The script on post #39
https://forum.mikrotik.com/viewtopic.php?p=979117#p964465
is for read system-id instead of serial number on CHR (not software-id), because CHR do not have serial number, but system-id
OK, thanks for the clarification.
BR.
This part does not work on x86 routers, it seems to not like the routerboard command.
After testing adding the correct x86 name like this:
{
/system
:local board ([/system resource get board-name])
:local serial na
:if ($board!="x86") do={
/system routerboard
:set serial [get serial-number]
} else={
/system license
:set serial [get system-id]
}
:put "$serial"
}
I get this output on 7.7 routerOS on x86
.
.
Just to show the version:
:put ([/system resource get board-name])
x86
To get it to work temporarily, just replace this:
:local serial na
:if ($board!="CHR") do={
:set serial [routerboard get serial-number]
} else={
/system license
:set serial [get system-id]
}
with this
:local serial <your id>
when you do not know if something exist…
:global thisvar "no routerboard"
:execute ":global thisvar; :set thisvar [/system routerboard get serial-number]"
:delay 1s
:put $thisvar
Can you please help me to get that inn to the script?
{
/system
:local board [resource get board-name]
:local serial “undefined”
:if (!($board~“(x86|CHR)”)) do={
:global testrbsn “NO RouterBOARD”
:execute “:global testrbsn; :set testrbsn [/system routerboard get serial-number]”
:delay 1s
:set serial $testrbsn
:set testrbsn
} else={
:if ($board=“x86”) do={:set serial [license get software-id]}
:if ($board=“CHR”) do={:set serial [license get system-id]}
}
:put “$serial”
}
Updated to version 1.6 in first post to also work with x86 routers that did fail due to missing serial.
Big thanks to Rextended
This really is great! Thanks a million for your efforts and help!
It would be better if it uses tmpfs in ROSv7.7 instead of the flash memory.
Why is that better and will that work on all MT routers?