From 8889545d70893fce5c90b1ffe0b8789a0a6768e9 Mon Sep 17 00:00:00 2001 From: "pavel.muhortov" Date: Sat, 18 Feb 2023 10:22:35 +0300 Subject: [PATCH] update error notification --- converter.sh | 2 +- publisher.sh | 2 +- sequences.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/converter.sh b/converter.sh index 4caaefa..0157a41 100644 --- a/converter.sh +++ b/converter.sh @@ -29,7 +29,7 @@ execquite() { } execerror() { addtologs "error: $1" - curl -s -X POST $telegramapiurl/sendMessage -d chat_id=$telegramchatid -d text="error: $1" >> /dev/null 2>&1 + curl -s -X POST $telegramapiurl/sendMessage -d chat_id=$telegramchatid -d text="$(basename -s .sh $0) error: $1" >> /dev/null 2>&1 execquite } getconfig() { diff --git a/publisher.sh b/publisher.sh index e2dff81..1846b68 100644 --- a/publisher.sh +++ b/publisher.sh @@ -32,7 +32,7 @@ execquite() { } execerror() { addtologs "error: $1" - curl -s -X POST $telegramapiurl/sendMessage -d chat_id=$telegramchatid -d text="error: $1" >> /dev/null 2>&1 + curl -s -X POST $telegramapiurl/sendMessage -d chat_id=$telegramchatid -d text="$(basename -s .sh $0) error: $1" >> /dev/null 2>&1 execquite } getconfig() { diff --git a/sequences.sh b/sequences.sh index 984fe56..d9fb9f1 100644 --- a/sequences.sh +++ b/sequences.sh @@ -32,7 +32,7 @@ execquite() { } execerror() { addtologs "error: $1" - curl -s -X POST $telegramapiurl/sendMessage -d chat_id=$telegramchatid -d text="error: $1" >> /dev/null 2>&1 + curl -s -X POST $telegramapiurl/sendMessage -d chat_id=$telegramchatid -d text="$(basename -s .sh $0) error: $1" >> /dev/null 2>&1 execquite } getconfig() {