150-poe-passthrough 381 B

12345678910111213
  1. #!/usr/bin/lua
  2. local sysconfig = require 'gluon.sysconfig'
  3. local site = require 'gluon.site_config'
  4. if (not sysconfig.gluon_version) and (site.poe_passthrough == true) then
  5. local uci = require('luci.model.uci').cursor()
  6. if uci:get('system', 'gpio_switch_poe_passthrough') then
  7. uci:set('system', 'gpio_switch_poe_passthrough', 'value', 1)
  8. uci:save('system')
  9. end
  10. end