diff options
Diffstat (limited to 'applications/luci-app-openvpn')
-rw-r--r-- | applications/luci-app-openvpn/luasrc/controller/openvpn.lua | 19 | ||||
-rw-r--r-- | applications/luci-app-openvpn/po/bg/openvpn.po | 8 |
2 files changed, 16 insertions, 11 deletions
diff --git a/applications/luci-app-openvpn/luasrc/controller/openvpn.lua b/applications/luci-app-openvpn/luasrc/controller/openvpn.lua index 2d57e8d3ad..a30ac81a99 100644 --- a/applications/luci-app-openvpn/luasrc/controller/openvpn.lua +++ b/applications/luci-app-openvpn/luasrc/controller/openvpn.lua @@ -13,13 +13,18 @@ function index() end function ovpn_upload() - local fs = require("nixio.fs") - local http = require("luci.http") - local util = require("luci.util") - local uci = require("luci.model.uci").cursor() - local upload = http.formvalue("ovpn_file") - local name = http.formvalue("instance_name2") - local file = "/etc/openvpn/" ..name.. ".ovpn" + local fs = require("nixio.fs") + local http = require("luci.http") + local util = require("luci.util") + local uci = require("luci.model.uci").cursor() + local upload = http.formvalue("ovpn_file") + local name = http.formvalue("instance_name2") + local basedir = "/etc/openvpn" + local file = basedir.. "/" ..name.. ".ovpn" + + if not fs.stat(basedir) then + fs.mkdir(basedir) + end if name and upload then local fp diff --git a/applications/luci-app-openvpn/po/bg/openvpn.po b/applications/luci-app-openvpn/po/bg/openvpn.po index 16bbe2030f..bba6e72a91 100644 --- a/applications/luci-app-openvpn/po/bg/openvpn.po +++ b/applications/luci-app-openvpn/po/bg/openvpn.po @@ -3,8 +3,8 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-05-19 19:35+0200\n" -"PO-Revision-Date: 2020-01-14 15:22+0000\n" -"Last-Translator: Franco Castillo <castillofrancodamian@gmail.com>\n" +"PO-Revision-Date: 2021-07-05 20:29+0000\n" +"Last-Translator: Iskren Mihaylov <iskren.mihaylov91@gmail.com>\n" "Language-Team: Bulgarian <https://hosted.weblate.org/projects/openwrt/" "luciapplicationsopenvpn/bg/>\n" "Language: bg\n" @@ -12,7 +12,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.11-dev\n" +"X-Generator: Weblate 4.8-dev\n" #: applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua:364 msgid "'net30', 'p2p', or 'subnet'" @@ -551,7 +551,7 @@ msgstr "" #: applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua:37 msgid "Save" -msgstr "" +msgstr "Запази" #: applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua:61 msgid "" |