„gaboshlib/g_signal-notify.bashfunc“ ändern
This commit is contained in:
parent
07588a498b
commit
7bd0e1790c
@ -2,8 +2,16 @@
|
|||||||
|
|
||||||
function g_signal-notify {
|
function g_signal-notify {
|
||||||
[ -z "$1" ] && return 0
|
[ -z "$1" ] && return 0
|
||||||
[ -s /usr/local/bin/notify.sh ] || g_echo_error "$0: /usr/local/bin/notify.sh empty or not existing"
|
if ! [ -s /usr/local/bin/notify.sh ]
|
||||||
[ -x /usr/local/bin/notify.sh ] || g_echo_error "$0: /usr/local/bin/notify.sh not executable"
|
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}\""
|
[ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user