- if luci.fs.isfile("/var/run/openvpn_%s.pid" % section) then
- local pid = io.lines("/var/run/openvpn_%s.pid" % section)()
- if pid and #pid > 0 and tonumber(pid) ~= nil then
- return (luci.sys.process.signal(pid, 0))
- and translatef("openvpn_active_yes", pid)
- or translate("openvpn_active_no")
- end
+ local pid = fs.readfile("/var/run/openvpn_%s.pid" % section)
+ if pid and #pid > 0 and tonumber(pid) ~= nil then
+ return (sys.process.signal(pid, 0))
+ and translatef("openvpn_active_yes", pid)
+ or translate("openvpn_active_no")