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"
This commit is contained in:
Daniel Ehlers 2014-07-07 01:36:31 +02:00
parent 6cc530cefe
commit 91b43d0df4
1 changed files with 12 additions and 0 deletions

View File

@ -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