mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
sms-forward: add workaround to fix removal of messages
Removal of messages is broken in RouterOS 7.8:
[admin@MikroTik] > /tool/sms/inbox/remove [ find ]
failure: Interface not running!
Of course the interface is running. Toggling the auto-erase setting
fixes this until next boot. So let's add a workaround...
Reported to support (SUP-110828), but not (yet) acknowledged. 🤨
This commit is contained in:
parent
0d4ab1fb3e
commit
eab87e4d60
1 changed files with 10 additions and 0 deletions
|
@ -13,9 +13,11 @@
|
|||
|
||||
:global Identity;
|
||||
:global SmsForwardHooks;
|
||||
:global SmsForwardWorkaround;
|
||||
|
||||
:global IfThenElse;
|
||||
:global LogPrintExit2;
|
||||
:global RequiredRouterOS;
|
||||
:global ScriptLock;
|
||||
:global SendNotification2;
|
||||
:global SymbolForNotification;
|
||||
|
@ -28,6 +30,14 @@ $ScriptLock $0;
|
|||
$LogPrintExit2 warning $0 ("Receiving of SMS is not enabled.") true;
|
||||
}
|
||||
|
||||
:if ($SmsForwardWorkaround != true && \
|
||||
[ $RequiredRouterOS $0 "7.8" false ] = true) do={
|
||||
:local AutoErase [ /tool/sms/get auto-erase ];
|
||||
/tool/sms/set auto-erase=(!$AutoErase);
|
||||
/tool/sms/set auto-erase=$AutoErase;
|
||||
:set SmsForwardWorkaround true;
|
||||
}
|
||||
|
||||
$WaitFullyConnected;
|
||||
|
||||
:local Settings [ /tool/sms/get ];
|
||||
|
|
Loading…
Reference in a new issue