mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
telegram-chat: handle error in command...
This commit is contained in:
parent
44c30efbcd
commit
c2cf05e9e5
1 changed files with 2 additions and 1 deletions
|
@ -100,7 +100,8 @@ $WaitFullyConnected;
|
||||||
:local File ("tmpfs/telegram-chat/" . [ $GetRandom20CharAlNum 6 ]);
|
:local File ("tmpfs/telegram-chat/" . [ $GetRandom20CharAlNum 6 ]);
|
||||||
$MkDir "tmpfs/telegram-chat";
|
$MkDir "tmpfs/telegram-chat";
|
||||||
$LogPrintExit2 info $0 ("Running command: " . $Text) false;
|
$LogPrintExit2 info $0 ("Running command: " . $Text) false;
|
||||||
:exec script=($Text . "; :execute script=\":put\" file=" . $File . ".done") file=$File;
|
:exec script=(":do {\n" . $Text . "\n} on-error={};" . \
|
||||||
|
":execute script=\":put\" file=" . $File . ".done") file=$File;
|
||||||
:if ([ $WaitForFile ($File . ".done.txt") 200 ] = false) do={
|
:if ([ $WaitForFile ($File . ".done.txt") 200 ] = false) do={
|
||||||
:set State "The command did not finish, still running in background.\n\n";
|
:set State "The command did not finish, still running in background.\n\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue