diff options
author | Florian Eckert <fe@dev.tdt.de> | 2020-10-02 15:54:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-02 15:54:25 +0200 |
commit | d61a1c1241b4323e60ad7f9724e97e5871ce96ae (patch) | |
tree | c1bbd6250a906f1a27b775dee0e5f4de56231506 /applications/luci-app-ddns/root/usr/libexec/rpcd/luci.ddns | |
parent | adc89f77d0bcd4945710a56600c1fbd0c2c73fae (diff) | |
parent | e478875c6c8756d3a8ff612c333a38d2f3f9cc8e (diff) |
Merge pull request #4471 from Ansuel/ddns-refresh
luci-app-ddns: rework with new ddns changes
Diffstat (limited to 'applications/luci-app-ddns/root/usr/libexec/rpcd/luci.ddns')
-rwxr-xr-x | applications/luci-app-ddns/root/usr/libexec/rpcd/luci.ddns | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/applications/luci-app-ddns/root/usr/libexec/rpcd/luci.ddns b/applications/luci-app-ddns/root/usr/libexec/rpcd/luci.ddns index 7710ee66f4..0a60142e6f 100755 --- a/applications/luci-app-ddns/root/usr/libexec/rpcd/luci.ddns +++ b/applications/luci-app-ddns/root/usr/libexec/rpcd/luci.ddns @@ -7,6 +7,7 @@ local UCI = require "luci.model.uci" local sys = require "luci.sys" local util = require "luci.util" +local ddns_package_path = "/usr/share/ddns" local luci_helper = "/usr/lib/ddns/dynamic_dns_lucihelper.sh" local srv_name = "ddns-scripts" @@ -155,6 +156,7 @@ local methods = { local ipkg = require "luci.model.ipkg" local uci = UCI.cursor() local dateformat = uci:get("ddns", "global", "ddns_dateformat") or "%F %R" + local services_mtime = fs.stat(ddns_package_path .. "/list", 'mtime') uci:unload("ddns") local ver, srv_ver_cmd local res = {} @@ -169,6 +171,7 @@ local methods = { res['_version'] = ver and #ver > 0 and ver or nil res['_enabled'] = sys.init.enabled("ddns") res['_curr_dateformat'] = os.date(dateformat) + res['_services_list'] = services_mtime and os.date(dateformat, services_mtime) or 'NO_LIST' return res end |