Merge pull request #1818 from dibdot/lxc_fix
[project/luci.git] / applications / luci-app-ocserv / luasrc / controller / ocserv.lua
index 229102d..79c6ddb 100644 (file)
@@ -1,15 +1,5 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2014 Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-]]--
+-- Copyright 2014 Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
+-- Licensed to the public under the Apache License 2.0.
 
 module("luci.controller.ocserv", package.seeall)
 
@@ -38,7 +28,7 @@ function index()
                call("ocserv_status")).leaf = true
 
        entry({"admin", "services", "ocserv", "disconnect"},
-               call("ocserv_disconnect")).leaf = true
+               post("ocserv_disconnect")).leaf = true
 
 end
 
@@ -54,7 +44,7 @@ function ocserv_status()
                        if not ln then break end
                
                        local id, user, group, vpn_ip, ip, device, time, cipher, status = 
-                               ln:match("^%s*(%d+)%s+([-_%w]+)%s+([%.%*-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+).*")
+                               ln:match("^%s*(%d+)%s+([-_%w]+)%s+([%(%)%.%*-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%(%)%:%.-_%w]+)%s+([%:%.-_%w]+).*")
                        if id then
                                fwd[#fwd+1] = {
                                        id = id,