mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
telegram-chat: error when making directory fails
This commit is contained in:
+3
-1
@@ -126,7 +126,9 @@
|
||||
:if ([ $ValidateSyntax ($Message->"text") ] = true) do={
|
||||
:local State "";
|
||||
:local File ("tmpfs/telegram-chat/" . [ $GetRandom20CharAlNum 6 ]);
|
||||
$MkDir "tmpfs/telegram-chat";
|
||||
:if ([ $MkDir "tmpfs/telegram-chat" ] = false) do={
|
||||
$LogPrintExit2 error $ScriptName ("Failed creating directory!") true;
|
||||
}
|
||||
$LogPrintExit2 info $ScriptName ("Running command from update " . $UpdateID . ": " . $Message->"text") false;
|
||||
:execute script=(":do {\n" . $Message->"text" . "\n} on-error={ /file/add name=\"" . $File . ".failed\" };" . \
|
||||
"/file/add name=\"" . $File . ".done\"") file=($File . "\00");
|
||||
|
||||
Reference in New Issue
Block a user