mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-31 00:04:51 +02:00
telegram-chat: error when making directory fails
This commit is contained in:
parent
ed790dea6e
commit
010bea56dc
1 changed files with 3 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue