ee6afaced9
Some files have received some additional refactoring.
13 lines
319 B
Lua
Executable File
13 lines
319 B
Lua
Executable File
#!/usr/bin/lua
|
|
|
|
local site = require 'gluon.site'
|
|
local uci = require('simple-uci').cursor()
|
|
|
|
local config = 'gluon-node-info'
|
|
local role = uci:get(config, uci:get_first(config, 'system'), 'role')
|
|
|
|
if not role then
|
|
uci:set(config, uci:get_first(config, 'system'), 'role', site.roles.default(''))
|
|
uci:save(config)
|
|
end
|