diff options
author | Christian Hesse <mail@eworm.de> | 2023-03-23 13:51:52 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-03-23 13:59:55 +0100 |
commit | eab87e4d60898e64efe44c49a07526906910816b (patch) | |
tree | e994a631fa37d157a1c369f458486f1990da2d7c /sms-forward.rsc | |
parent | 0d4ab1fb3e4f2eb396c2563898e4788249228cc7 (diff) |
sms-forward: add workaround to fix removal of messagesrouteros-7.8
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. 🤨
Diffstat (limited to 'sms-forward.rsc')
-rw-r--r-- | sms-forward.rsc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sms-forward.rsc b/sms-forward.rsc index 802da48..74b1b31 100644 --- a/sms-forward.rsc +++ b/sms-forward.rsc @@ -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 ]; |