gluon-config-mode-mesh-vpn: add extra message if mesh-VPN was not selected
This was introduced in ffhh-packages at https://github.com/freifunkhamburg/ffhh-packages/tree/master/gluon-config-mode-reboot-ffhh
This commit is contained in:
parent
fcf3abd9c4
commit
434da00e49
@ -31,6 +31,13 @@ msgstr ""
|
||||
"<%= pubkey %>"
|
||||
"</div>"
|
||||
|
||||
msgid "gluon-config-mode:novpn"
|
||||
msgstr ""
|
||||
"<p><div class=\"the-key\">Du hast ausgewählt, <strong>kein Mesh-VPN</strong> "
|
||||
"zu nutzen. Dein Knoten kann also nur dann eine Verbindung zum Freifunk Netz "
|
||||
"aufbauen, wenn andere Freifunk-Router in WLAN-Reichweite sind."
|
||||
"</div></p>"
|
||||
|
||||
msgid "gluon-config-mode:reboot"
|
||||
msgstr ""
|
||||
"<p>Dein Knoten startet gerade neu und wird anschließend versuchen, "
|
||||
|
@ -28,6 +28,12 @@ msgstr ""
|
||||
"<%= pubkey %>"
|
||||
"</div>"
|
||||
|
||||
msgid "gluon-config-mode:novpn"
|
||||
msgstr ""
|
||||
"<p><div class=\"the-key\">You have selected <strong>not</strong> to use the mesh VPN. "
|
||||
"Your node will only be able to connect to the Freifunk network if other nodes in reach "
|
||||
"already have a connection.</div></p>"
|
||||
|
||||
msgid "gluon-config-mode:reboot"
|
||||
msgstr ""
|
||||
"<p>The node is currently rebooting and will try to connect to other "
|
||||
|
@ -31,6 +31,12 @@ msgstr ""
|
||||
"<%= pubkey %>"
|
||||
"</div>"
|
||||
|
||||
msgid "gluon-config-mode:novpn"
|
||||
msgstr ""
|
||||
"<p><div class=\"the-key\">Vous avez choisi de <strong>ne pas utiliser</strong> "
|
||||
"le réseau VPN. Votre nœud ne pourra se connecter au réseau Freifunk que si "
|
||||
"d'autres nœuds à portée ont déjà une connexion.</div></p>"
|
||||
|
||||
msgid "gluon-config-mode:reboot"
|
||||
msgstr ""
|
||||
"<p>Votre nœud es en train de redémarrer et va ensuite éssayer de se connecter "
|
||||
|
@ -7,6 +7,9 @@ msgstr ""
|
||||
msgid "gluon-config-mode:pubkey"
|
||||
msgstr ""
|
||||
|
||||
msgid "gluon-config-mode:novpn"
|
||||
msgstr ""
|
||||
|
||||
msgid "gluon-config-mode:reboot"
|
||||
msgstr ""
|
||||
|
||||
|
@ -364,6 +364,9 @@ gluon-config-mode:welcome
|
||||
gluon-config-mode:pubkey
|
||||
Information about the public VPN key on the reboot page.
|
||||
|
||||
gluon-config-mode:novpn
|
||||
Information shown on the reboot page, if the mesh VPN was not selected.
|
||||
|
||||
gluon-config-mode:altitude-label
|
||||
Label for the ``altitude`` field
|
||||
|
||||
|
@ -1,25 +1,27 @@
|
||||
local uci = luci.model.uci.cursor()
|
||||
local meshvpn_enabled = uci:get("fastd", "mesh_vpn", "enabled", "0")
|
||||
|
||||
local i18n = require "luci.i18n"
|
||||
local util = require "luci.util"
|
||||
|
||||
local gluon_luci = require 'gluon.luci'
|
||||
local site = require 'gluon.site_config'
|
||||
local sysconfig = require 'gluon.sysconfig'
|
||||
|
||||
local pretty_hostname = require 'pretty_hostname'
|
||||
|
||||
local pubkey = ""
|
||||
local hostname = pretty_hostname.get(uci)
|
||||
local contact = uci:get_first("gluon-node-info", "owner", "contact")
|
||||
|
||||
if meshvpn_enabled ~= "1" then
|
||||
return nil
|
||||
local msg = i18n.translate('gluon-config-mode:novpn')
|
||||
else
|
||||
local i18n = require "luci.i18n"
|
||||
local util = require "luci.util"
|
||||
|
||||
local gluon_luci = require 'gluon.luci'
|
||||
local site = require 'gluon.site_config'
|
||||
local sysconfig = require 'gluon.sysconfig'
|
||||
|
||||
local pretty_hostname = require 'pretty_hostname'
|
||||
|
||||
local pubkey = util.trim(util.exec("/etc/init.d/fastd show_key " .. "mesh_vpn"))
|
||||
local hostname = pretty_hostname.get(uci)
|
||||
local contact = uci:get_first("gluon-node-info", "owner", "contact")
|
||||
|
||||
pubkey = util.trim(util.exec("/etc/init.d/fastd show_key " .. "mesh_vpn"))
|
||||
local msg = i18n.translate('gluon-config-mode:pubkey')
|
||||
end
|
||||
|
||||
return function ()
|
||||
return function ()
|
||||
luci.template.render_string(msg, {
|
||||
pubkey = pubkey,
|
||||
hostname = hostname,
|
||||
@ -29,5 +31,4 @@ else
|
||||
escape = gluon_luci.escape,
|
||||
urlescape = gluon_luci.urlescape,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user