From e6f0fac509d103a51b27cae5d5f7bb1d192e5e89 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 4 Dec 2016 02:16:46 +0100 Subject: Adding irc notification (opt-in). Signed-off-by: Daniel Baumann --- bin/container | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bin/container b/bin/container index 7bb62b8..484a0e1 100755 --- a/bin/container +++ b/bin/container @@ -56,6 +56,20 @@ else # logfile echo "${DATE} ${HOST} ${USER} ${PROGRAM} ${COMMAND} ${OPTIONS}" >> "/var/log/${SOFTWARE}/${PROGRAM}.log" + + # irc + if [ -e /usr/bin/irk ] && [ -e "/etc/default/${SOFTWARE}" ] + then + . /etc/default/${SOFTWARE} + + if [ -n "${IRK_TARGETS}" ] + then + for TARGET in ${IRK_TARGETS} + do + irk ${TARGET} "\x0300${USER}\x03@\x0312${HOST}:\x03 \x0303${PROGRAM}\x03 \x0307${COMMAND}\x03 ${OPTIONS}" + done + fi + fi ;; esac fi -- cgit v1.2.3