forked from github/server
configure dbname in eressea.ini (or don't use DB if not
This commit is contained in:
parent
f86d86d4c6
commit
abeb7e344e
|
@ -26,15 +26,17 @@ function callbacks(rules, name, ...)
|
|||
end
|
||||
|
||||
local function dbupdate()
|
||||
update_scores()
|
||||
dbname = config.dbname or 'eressea.db'
|
||||
edb = db.open(config.basepath..'/'..dbname)
|
||||
if edb~=nil then
|
||||
edb:update_factions()
|
||||
edb:update_scores()
|
||||
else
|
||||
eressea.log.error("could not open "..config.basepath..'/'..dbname)
|
||||
end
|
||||
update_scores()
|
||||
if config.dbname then
|
||||
dbname = config.basepath..'/'..config.dbname
|
||||
edb = db.open(dbame)
|
||||
if edb~=nil then
|
||||
edb:update_factions()
|
||||
edb:update_scores()
|
||||
else
|
||||
eressea.log.error("could not open "..dbname)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function write_emails(locales)
|
||||
|
|
Loading…
Reference in New Issue