2014-08-07 18:06:14 +02:00
|
|
|
local uci = luci.model.uci.cursor()
|
|
|
|
local meshvpn_enabled = uci:get("fastd", "mesh_vpn", "enabled", "0")
|
|
|
|
|
|
|
|
if meshvpn_enabled == "1" then
|
|
|
|
return nil
|
|
|
|
else
|
2016-10-04 19:47:36 +02:00
|
|
|
local gluon_luci = require 'gluon.luci'
|
2015-04-11 09:53:14 +02:00
|
|
|
local i18n = require "luci.i18n"
|
2014-08-07 18:06:14 +02:00
|
|
|
local site = require 'gluon.site_config'
|
|
|
|
local sysconfig = require 'gluon.sysconfig'
|
|
|
|
|
2016-10-04 19:47:36 +02:00
|
|
|
local pretty_hostname = require 'pretty_hostname'
|
|
|
|
|
|
|
|
local hostname = pretty_hostname.get(uci)
|
2014-08-07 18:06:14 +02:00
|
|
|
|
2015-04-11 09:53:14 +02:00
|
|
|
local msg = [[<p>]] .. i18n.translate('gluon-config-mode:nopubkey') .. [[</p>]]
|
|
|
|
|
2014-08-07 18:06:14 +02:00
|
|
|
return function ()
|
2016-10-04 19:47:36 +02:00
|
|
|
luci.template.render_string(msg,
|
|
|
|
{
|
|
|
|
hostname=hostname,
|
|
|
|
site=site,
|
|
|
|
sysconfig=sysconfig,
|
|
|
|
escape = gluon_luci.escape,
|
|
|
|
urlescape = gluon_luci.urlescape,
|
|
|
|
}
|
|
|
|
)
|
|
|
|
end
|
2014-08-07 18:06:14 +02:00
|
|
|
end
|