From 7bd0e1790c01ccaf90b3ef2ca457a80e427087a9 Mon Sep 17 00:00:00 2001 From: olli Date: Tue, 17 Jan 2023 09:06:08 +0100 Subject: [PATCH] =?UTF-8?q?=E2=80=9Egaboshlib/g=5Fsignal-notify.bashfunc?= =?UTF-8?q?=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gaboshlib/g_signal-notify.bashfunc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gaboshlib/g_signal-notify.bashfunc b/gaboshlib/g_signal-notify.bashfunc index 9349bfb..8f46c82 100644 --- a/gaboshlib/g_signal-notify.bashfunc +++ b/gaboshlib/g_signal-notify.bashfunc @@ -2,8 +2,16 @@ function g_signal-notify { [ -z "$1" ] && return 0 - [ -s /usr/local/bin/notify.sh ] || g_echo_error "$0: /usr/local/bin/notify.sh empty or not existing" - [ -x /usr/local/bin/notify.sh ] || g_echo_error "$0: /usr/local/bin/notify.sh not executable" + if ! [ -s /usr/local/bin/notify.sh ] + then + g_echo_error "$0: /usr/local/bin/notify.sh empty or not existing" + return 1 + fi + if ! [ -x /usr/local/bin/notify.sh ] + tehn + g_echo_error "$0: /usr/local/bin/notify.sh not executable" + return 1 + fi [ -n "${SIGNAL_GROUP}" ] && g_signal_group="-g \"${SIGNAL_GROUP}\"" cat <<< "$(g_date_print) $@" | tail -n 100 | /usr/local/bin/notify.sh $g_signal_group }