luci-app-mosdns: print mosdns version on Luci. close #60
This commit is contained in:
parent
0e21e1554f
commit
bd89c52b99
@ -1,5 +1,10 @@
|
|||||||
|
if nixio.fs.access("/usr/bin/mosdns") then
|
||||||
|
mosdns_version=luci.sys.exec("/usr/share/mosdns/mosdns.sh version")
|
||||||
|
else
|
||||||
|
mosdns_version="Unknown Version"
|
||||||
|
end
|
||||||
m = Map("mosdns")
|
m = Map("mosdns")
|
||||||
m.title = translate("MosDNS")
|
m.title = translate("MosDNS") .. " " .. mosdns_version
|
||||||
m.description = translate("MosDNS is a 'programmable' DNS forwarder.")
|
m.description = translate("MosDNS is a 'programmable' DNS forwarder.")
|
||||||
|
|
||||||
m:section(SimpleSection).template = "mosdns/mosdns_status"
|
m:section(SimpleSection).template = "mosdns/mosdns_status"
|
||||||
|
@ -100,6 +100,9 @@ case $script_action in
|
|||||||
"adlist_update")
|
"adlist_update")
|
||||||
adlist_update && restart_service
|
adlist_update && restart_service
|
||||||
;;
|
;;
|
||||||
|
"version")
|
||||||
|
mosdns version
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user