<%- local fs = require 'luci.fs' local uci = require('luci.model.uci').cursor() local util = require 'luci.util' local site = require 'gluon.site_config' local sysconfig = require 'gluon.sysconfig' local platform = require 'gluon.platform' local keys = { hostname = 'Hostname', primary_mac = 'MAC-Adresse', model = 'Hardware-Modell', version = 'Gluon-Version', release = 'Firmware-Release', site = 'Site', pubkey = 'Öffentlicher VPN-Schlüssel', } local values = { hostname = uci:get_first('system', 'system', 'hostname'), primary_mac = sysconfig.primary_mac, model = platform.get_model(), version = util.trim(fs.readfile('/lib/gluon/gluon-version')), release = util.trim(fs.readfile('/lib/gluon/release')), site = site.site_name, pubkey = 'n/a', } local meshvpn_enabled = uci:get("fastd", "mesh_vpn", "enabled", "0") if meshvpn_enabled == "1" then local pubkey = util.trim(util.exec('/etc/init.d/fastd show_key mesh_vpn')) if pubkey ~= '' then values.pubkey = pubkey end end -%>

Info

<% for _, key in ipairs({'hostname', 'primary_mac', 'model', 'version', 'release', 'site', 'pubkey'}) do %>
<%=keys[key]%>
<%=values[key] or 'n/a'%>
<% end %>