summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua
index 52ba9e3f2..d2b5d32c0 100644
--- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua
+++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua
@@ -28,7 +28,7 @@ uci:foreach( "openvpn_recipes", "openvpn_recipe",
function s.getPID(section) -- Universal function which returns valid pid # or nil
local pid = sys.exec("%s | grep -w '[o]penvpn(%s)'" % { psstring, section })
if pid and #pid > 0 then
- return tonumber(pid:match("^%d+"))
+ return tonumber(pid:match("^%s*(%d+)"))
else
return nil
end