#!/usr/bin/lua

local sysconfig = require 'gluon.sysconfig'

-- Initial
if sysconfig.gluon_version then
	os.exit(0)
end


local site = require 'gluon.site'
local util = require 'gluon.util'
local uci = require('simple-uci').cursor()
local pretty_hostname = require 'pretty_hostname'

local system = uci:get_first('system', 'system')

pretty_hostname.set(uci, util.default_hostname())
uci:set('system', system, 'timezone', site.timezone())

uci:save('system')
