From bb699204cae2e73900e801aaa59ead03be20923a 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 package/gluon-ath9k-workaround/files/lib/gluon/upgrade/ath9k-workaround/invariant/010-monitor diff --git a/package/gluon-ath9k-workaround/files/lib/gluon/upgrade/ath9k-workaround/invariant/010-monitor b/package/gluon-ath9k-workaround/files/lib/gluon/upgrade/ath9k-workaround/invariant/010-monitor new file mode 100755 index 00000000..ac696247 --- /dev/null +++ b/package/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