From 6f354c8bb0e412993b7df350f2f9b22e1966677b Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 3 Apr 2020 16:50:21 +0200 Subject: global-functions: $ScriptFromTerminal: use $LogPrintExit --- global-functions | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'global-functions') diff --git a/global-functions b/global-functions index 42e5fcf..0b1ba77 100644 --- a/global-functions +++ b/global-functions @@ -379,16 +379,19 @@ :set ScriptFromTerminal do={ :local Script [ :tostr $1 ]; + :global LogPrintExit; + :foreach Job in=[ / system script job find where script=$Script ] do={ :set Job [ / system script job get $Job ]; :while ([ :typeof ($Job->"parent") ] = "id") do={ :set Job [ / system script job get [ find where .id=($Job->"parent") ] ]; } :if (($Job->"type") = "login") do={ - :log debug ("Script " . $Script . " started from terminal."); + $LogPrintExit debug ("Script " . $Script . " started from terminal.") false; :return true; } } + $LogPrintExit debug ("Script " . $Script . " NOT started from terminal.") false; :return false; } -- cgit v1.2.3-54-g00ecf