function m.commit_handler(self)
if self.changed then -- changes ?
- os.execute("/etc/init.d/ddns reload &") -- reload configuration
+ local command = CTRL.luci_helper .. " -- reload"
+ os.execute(command) -- reload configuration
end
end
return self.map:get(section)
end
--- allow_local_ip -- ##########################################################
-local ali = ns:option(Flag, "allow_local_ip")
+-- upd_privateip -- ###########################################################
+local ali = ns:option(Flag, "upd_privateip")
ali.title = translate("Allow non-public IP's")
ali.description = translate("Non-public and by default blocked IP's") .. ":"
.. [[<br /><strong>IPv4: </strong>]]
.. "::/32, f000::/4"
ali.default = "0"
--- date_format -- #############################################################
-local df = ns:option(Value, "date_format")
+-- ddns_dateformat -- #########################################################
+local df = ns:option(Value, "ddns_dateformat")
df.title = translate("Date format")
df.description = [[<a href="http://www.cplusplus.com/reference/ctime/strftime/" target="_blank">]]
.. translate("For supported codes look here")
DDNS.value_parse(self, section, novld)
end
--- run_dir -- #################################################################
-local rd = ns:option(Value, "run_dir")
+-- ddns_rundir -- #############################################################
+local rd = ns:option(Value, "ddns_rundir")
rd.title = translate("Status directory")
rd.description = translate("Directory contains PID and other status information for each running section")
rd.default = "/var/run/ddns"
DDNS.value_parse(self, section, novld)
end
--- log_dir -- #################################################################
-local ld = ns:option(Value, "log_dir")
+-- ddns_logdir -- #############################################################
+local ld = ns:option(Value, "ddns_logdir")
ld.title = translate("Log directory")
ld.description = translate("Directory contains Log files for each running section")
ld.default = "/var/log/ddns"
DDNS.value_parse(self, section, novld)
end
--- log_lines -- ###############################################################
-local ll = ns:option(Value, "log_lines")
+-- ddns_loglines -- ###########################################################
+local ll = ns:option(Value, "ddns_loglines")
ll.title = translate("Log length")
ll.description = translate("Number of last lines stored in log files")
ll.default = "250"