limit notify on last 100 lines

This commit is contained in:
olli 2022-12-01 10:21:44 +01:00
parent cffd44ad0d
commit 161e01c399

View File

@ -13,7 +13,7 @@ function g_echo_warn {
cat <<< "$(date "+%F %T") $(hostname) $0($$) WARNING: $@" | debian-chroot.sh /usr/local/bin/notify.sh
elif [ -x /usr/local/bin/notify.sh ]
then
cat <<< "$(date "+%F %T") $(hostname) $0($$) WARNING: $@" | /usr/local/bin/notify.sh
cat <<< "$(date "+%F %T") $(hostname) $0($$) WARNING: $@" | tail -n 100 | /usr/local/bin/notify.sh
fi
fi
[ -z $DISPLAY ] || zenity --notification --text="$@"