19 lines
411 B
Lua
Executable File
19 lines
411 B
Lua
Executable File
#!/usr/bin/lua
|
|
|
|
local site = require 'gluon.site_config'
|
|
local uci = require 'luci.model.uci'
|
|
|
|
local c = uci.cursor()
|
|
|
|
if not c:get('network', 'mesh_wan') then
|
|
c:section('network', 'interface', 'mesh_wan',
|
|
{ ifname = 'br-wan'
|
|
, proto = 'batadv'
|
|
, mesh = 'bat0'
|
|
, auto = site.mesh_on_wan and 1 or 0
|
|
})
|
|
end
|
|
|
|
c:save('network')
|
|
c:commit('network')
|