• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Linux [Globalevents] Server does not shutdown

MUTANO

New Member
Joined
Jan 10, 2009
Messages
39
Reaction score
2
Location
Brazil - Santa Catarina
I'm hosting my server on Linux Ubuntu, and my overall save occurs at 7:10 in the morning. But it does not seem to be correctly by running the shutdown command.

The server closes, is no longer possible to log in, but the site still appearing as online. I believe the shutdown is not closing the executable and so restarter.sh is not taking action.

I was now hoping to give the time of the shutdown, he gave a freeze on the server and the instant he should have appeared to broadcast warning of the server save. The server is connected but caught without power log.

Already tested with config.lua option and several other scripts to GlobalEvents, but it's always the same situation.

local timetoss =10--minutes

function onTimer()return prepareShutdown(math.abs(math.ceil(timetoss)))end

function prepareShutdown(minutes)if(minutes <=0)then
addEvent(close,1*1000)
addEvent(global,10*1000)returnfalseend

if(minutes ==1)then
doBroadcastMessage("Server is going down in ".. minutes .." minute, please log out now!")
elseif(minutes <=3)then
doBroadcastMessage("Server is going down in ".. minutes .." minutes, please log out.")else
doBroadcastMessage("Server is going down in ".. minutes .." minutes.")end

shutdownEvent = addEvent(prepareShutdown,60000, minutes -1)returntrueend


function close()
doSetGameState(GAMESTATE_CLOSED)
end

functionglobal()
doSetGameState(GAMESTATE_SHUTDOWN)
end
 
Back
Top