From 91b43d0df48d835cb4cdf782d3023022a8c9f0f7 Mon Sep 17 00:00:00 2001 From: Daniel Ehlers Date: Mon, 7 Jul 2014 01:36:31 +0200 Subject: [PATCH] gluon-ath9k-workaround: bug reporting support If the `monitor` attribute in the site.conf is defined, the cron script is modifed to send debug informations, generated on bug detection, to given remote host and port, e.g.: "fda1:384a:74de:4242::2 8090" --- .../upgrade/ath9k-workaround/invariant/010-monitor | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 gluon/gluon-ath9k-workaround/files/lib/gluon/upgrade/ath9k-workaround/invariant/010-monitor diff --git a/gluon/gluon-ath9k-workaround/files/lib/gluon/upgrade/ath9k-workaround/invariant/010-monitor b/gluon/gluon-ath9k-workaround/files/lib/gluon/upgrade/ath9k-workaround/invariant/010-monitor new file mode 100755 index 000000000..ac6962477 --- /dev/null +++ b/gluon/gluon-ath9k-workaround/files/lib/gluon/upgrade/ath9k-workaround/invariant/010-monitor @@ -0,0 +1,12 @@ +#!/usr/bin/lua + +local site = require 'gluon.site_config' +local uci = require 'luci.model.uci' + +local c = uci.cursor() + +local f = io.open('/lib/gluon/cron/ath9k-workaround','w') +if f and site.monitor ~= nil then + f:write('* * * * * /usr/sbin/ath9k-workaround | nc ' .. site.monitor) + f:close() +end