telegram-chat: no need to :put ...

... a simple change to root dir is sufficient.
This commit is contained in:
Christian Hesse 2023-02-03 22:30:08 +01:00
parent 04c26d3d2e
commit 600203797b

View file

@ -103,8 +103,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=(":do {\n" . $Text . "\n} on-error={ :execute script=\":put\" file=" . $File . ".failed };" . \ :exec script=(":do {\n" . $Text . "\n} on-error={ :execute script=\"/\" file=" . $File . ".failed };" . \
":execute script=\":put\" file=" . $File . ".done") file=$File; ":execute script=\"/\" file=" . $File . ".done") file=$File;
:if ([ $WaitForFile ($File . ".done.txt") [ $EitherOr $TelegramChatRunTime 20s ] ] = false) do={ :if ([ $WaitForFile ($File . ".done.txt") [ $EitherOr $TelegramChatRunTime 20s ] ] = 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";
} }