300-setup-mode 398 B

1234567891011121314
  1. #!/usr/bin/lua
  2. local site = require 'gluon.site_config'
  3. local uci = require('simple-uci').cursor()
  4. if site.setup_mode
  5. and site.setup_mode.skip
  6. and not uci:get_first('gluon-setup-mode', 'setup_mode', 'configured', false) then
  7. local name = uci:get_first("gluon-setup-mode", "setup_mode")
  8. uci:set("gluon-setup-mode", name, "configured", true)
  9. uci:save('gluon-setup-mode')
  10. end