From 07588a498b99b1c0f01894e3df4e89ae5b332598 Mon Sep 17 00:00:00 2001 From: olli Date: Tue, 17 Jan 2023 09:04:36 +0100 Subject: [PATCH] added checks --- gaboshlib/g_signal-notify.bashfunc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gaboshlib/g_signal-notify.bashfunc b/gaboshlib/g_signal-notify.bashfunc index 8776af3..9349bfb 100644 --- a/gaboshlib/g_signal-notify.bashfunc +++ b/gaboshlib/g_signal-notify.bashfunc @@ -2,6 +2,8 @@ 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" [ -n "${SIGNAL_GROUP}" ] && g_signal_group="-g \"${SIGNAL_GROUP}\"" - cat <<< "$(g_date_print) $@" | tail -n 100 | /usr/local/bin/notify.sh $g_signal_group + cat <<< "$(g_date_print) $@" | tail -n 100 | /usr/local/bin/notify.sh $g_signal_group }