mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-07-31 16:24:30 +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={
|
:if ([ $ValidateSyntax ($Message->"text") ] = true) do={
|
||||||
:local State "";
|
:local State "";
|
||||||
:local File ("tmpfs/telegram-chat/" . [ $GetRandom20CharAlNum 6 ]);
|
: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;
|
$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\" };" . \
|
:execute script=(":do {\n" . $Message->"text" . "\n} on-error={ /file/add name=\"" . $File . ".failed\" };" . \
|
||||||
"/file/add name=\"" . $File . ".done\"") file=($File . "\00");
|
"/file/add name=\"" . $File . ".done\"") file=($File . "\00");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue