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
|
@ -27,13 +27,15 @@ end
|
||||||
|
|
||||||
local function dbupdate()
|
local function dbupdate()
|
||||||
update_scores()
|
update_scores()
|
||||||
dbname = config.dbname or 'eressea.db'
|
if config.dbname then
|
||||||
edb = db.open(config.basepath..'/'..dbname)
|
dbname = config.basepath..'/'..config.dbname
|
||||||
|
edb = db.open(dbame)
|
||||||
if edb~=nil then
|
if edb~=nil then
|
||||||
edb:update_factions()
|
edb:update_factions()
|
||||||
edb:update_scores()
|
edb:update_scores()
|
||||||
else
|
else
|
||||||
eressea.log.error("could not open "..config.basepath..'/'..dbname)
|
eressea.log.error("could not open "..dbname)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue