summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-12-04 01:16:46 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-12-04 01:27:33 +0000
commite6f0fac509d103a51b27cae5d5f7bb1d192e5e89 (patch)
tree0c6a14ea14a1004c8ebba28076e677242d91bc98 /bin
parentAdding logrotate handling for /var/log/container-tools/container.log. (diff)
downloadcompute-tools-e6f0fac509d103a51b27cae5d5f7bb1d192e5e89.tar.xz
compute-tools-e6f0fac509d103a51b27cae5d5f7bb1d192e5e89.zip
Adding irc notification (opt-in).
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/container14
1 files changed, 14 insertions, 0 deletions
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