0900-msg-reboot.lua 648 B

1234567891011121314151617181920212223
  1. local i18n = require 'luci.i18n'
  2. local site = require 'gluon.site_config'
  3. local gluon_luci = require 'gluon.luci'
  4. local sysconfig = require 'gluon.sysconfig'
  5. local pretty_hostname = require 'pretty_hostname'
  6. local uci = require("simple-uci").cursor()
  7. local hostname = pretty_hostname.get(uci)
  8. local contact = uci:get_first('gluon-node-info', 'owner', 'contact')
  9. local msg = i18n.translate('gluon-config-mode:reboot')
  10. return function ()
  11. luci.template.render_string(msg, {
  12. hostname = hostname,
  13. site = site,
  14. sysconfig = sysconfig,
  15. contact = contact,
  16. escape = gluon_luci.escape,
  17. urlescape = gluon_luci.urlescape,
  18. })
  19. end