Changeset 2174


Ignore:
Timestamp:
Sep 19, 2012, 3:25:50 PM (7 years ago)
Author:
matthijs
Message:

luci-openvpn: Allow changing the keepalive settings.

Thanks to Jon Spriggs for this patch.

Closes: #907

Location:
trunk/luci
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/luci/applications/luci-openvpn/luasrc/model/cbi/openvpn/firewall.lua

    r1998 r2174  
    2121x.default = require("luci.model.uci").cursor():get("openvpn", "openvpn", "wan") or "0"
    2222
     23local x = s:option(ListValue, "keepalive", translate("openvpn_keepalive", "Send periodic keepalives"))
     24x:value("0 0", translate("openvpn_keepalive_never", "Never"))
     25x:value("10 120", translate("openvpn_keepalive_normal", "Normal (every 10 seconds)"))
     26x:value("60 300", translate("openvpn_keepalive_reduced", "Reduced (every 60 seconds)"))
     27x:value("600 1200", translate("openvpn_keepalive_seldom", "Seldom (every 10 minutes)"))
     28x.default = require("luci.model.uci").cursor():get("openvpn", "openvpn", "keepalive") or "10 120"
     29
    2330return m
  • trunk/luci/i18n/english/luasrc/i18n/default.en.lua

    r2048 r2174  
    122122openvpn_desc = "Here you can configure your vpn server. VPN allows you to remotely connect to your home network from anywhere in the world."
    123123openvpn_generating = " Generating Keys"
     124openvpn_keepalive = "Send periodic keepalives"
     125openvpn_keepalive_never = "Never"
     126openvpn_keepalive_normal = "Normal (every 10 seconds)"
     127openvpn_keepalive_reduced = "Reduced (every 60 seconds)"
     128openvpn_keepalive_seldom = "Seldom (every 10 minutes)"
    124129openvpn_key = "OpenVPN is generating keys. This can take up to 10 minutes."
    125130openvpn_lan = "Local Network"
  • trunk/luci/modules/admin-fon/root/sbin/save-config.sh

    r2173 r2174  
    121121echo "uci import -m openvpn <<EOF"
    122122echo "config 'openvpn' 'openvpn'"
    123 for o in enable lan wan; do
     123for o in enable lan wan keepalive; do
    124124        echo "  option '$o' '$(config_get openvpn $o)'"
    125125done
Note: See TracChangeset for help on using the changeset viewer.