Skip to content

Commit 9798f87

Browse files
new: send the error message through ntfy if needed
Signed-off-by: thiswillbeyourgithub <[email protected]>
1 parent 51d9e54 commit 9798f87

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/NtfySummarizer/script.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,9 @@ if [[ -z "$topic_receive" || -z "$topic_send" ]]; then
2424
exit 1
2525
fi
2626

27-
python "${0:h}"/NtfySummarizer.py --topic="$topic_send"
27+
output=$(python "${0:h}"/NtfySummarizer.py --topic="$topic_send" 2>&1 >/dev/null) && echo "Success" && exit 0
28+
29+
mess="An error happened during the python execution
30+
Full output:
31+
$output"
32+
ntfy publish $topic_send "$mess" || echo $mess

0 commit comments

Comments
 (0)