summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-ddns/luasrc/tools
diff options
context:
space:
mode:
authorChristian Schoenebeck <christian.schoenebeck@gmail.com>2016-12-04 21:37:17 +0100
committerChristian Schoenebeck <christian.schoenebeck@gmail.com>2016-12-04 21:37:17 +0100
commit475b74b9bf611088a6b1c9ab81d02fd3b0eb8362 (patch)
treec1740a2c2d5ac819638a1043b6c9f23544d251a0 /applications/luci-app-ddns/luasrc/tools
parent1fd43b4b65e120d84f2b35529aa0816b63779683 (diff)
luci-app-ddns: update to support ddns-scripts 2.7.6
needed changes to support ddns-scripts 2.7.6 - new command line options of dynamic_ddns_lucihelper.sh - renamed global config options - new location of services files Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
Diffstat (limited to 'applications/luci-app-ddns/luasrc/tools')
-rwxr-xr-xapplications/luci-app-ddns/luasrc/tools/ddns.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/applications/luci-app-ddns/luasrc/tools/ddns.lua b/applications/luci-app-ddns/luasrc/tools/ddns.lua
index e55c673629..209d9c3a41 100755
--- a/applications/luci-app-ddns/luasrc/tools/ddns.lua
+++ b/applications/luci-app-ddns/luasrc/tools/ddns.lua
@@ -57,7 +57,7 @@ end
function epoch2date(epoch, format)
if not format or #format < 2 then
local uci = UCI.cursor()
- format = uci:get("ddns", "global", "date_format") or "%F %R"
+ format = uci:get("ddns", "global", "ddns_dateformat") or "%F %R"
uci:unload("ddns")
end
format = format:gsub("%%n", "<br />") -- replace newline
@@ -67,18 +67,18 @@ end
-- read lastupdate from [section].update file
function get_lastupd(section)
- local uci = UCI.cursor()
- local run_dir = uci:get("ddns", "global", "run_dir") or "/var/run/ddns"
- local etime = tonumber(NXFS.readfile("%s/%s.update" % { run_dir, section } ) or 0 )
+ local uci = UCI.cursor()
+ local rdir = uci:get("ddns", "global", "ddns_rundir") or "/var/run/ddns"
+ local etime = tonumber(NXFS.readfile("%s/%s.update" % { rdir, section } ) or 0 )
uci:unload("ddns")
return etime
end
-- read PID from run file and verify if still running
function get_pid(section)
- local uci = UCI.cursor()
- local run_dir = uci:get("ddns", "global", "run_dir") or "/var/run/ddns"
- local pid = tonumber(NXFS.readfile("%s/%s.pid" % { run_dir, section } ) or 0 )
+ local uci = UCI.cursor()
+ local rdir = uci:get("ddns", "global", "ddns_rundir") or "/var/run/ddns"
+ local pid = tonumber(NXFS.readfile("%s/%s.pid" % { rdir, section } ) or 0 )
if pid > 0 and not NX.kill(pid, 0) then
pid = 0
end