luci-app-openvpn: quote grep expression in getPID()
[oweals/luci.git] / applications / luci-app-openvpn / luasrc / model / cbi / openvpn.lua
index ccad531513c328e2f5491049566a50f7de31fa72..52ba9e3f298a7db4928630166f6ff39d72b0f9d9 100644 (file)
@@ -26,7 +26,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 })
+       local pid = sys.exec("%s | grep -w '[o]penvpn(%s)'" % { psstring, section })
        if pid and #pid > 0 then
                return tonumber(pid:match("^%d+"))
        else