#!/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' , mesh_no_rebroadcast = '1' , auto = site.mesh_on_wan and 1 or 0 }) end c:save('network')