Restarting linux dedicated server

How would I go about restarting a linux dedicated server in-game? Our rcon doesn’t work atm and “ulx rcon quit” also seems to not work…

Why not just change the map? If you use “map” command instead of “changelevel” this is effectively a full restart.

Not necessarily, if you change map any new folders that were added will not be loaded

Ah, you were trying to add new legacy addons? Then yeah, there’s no other way except restarting. By the way does your server have automatic restart on crash? If so you can force-crash server if you run this code on server:


It’s a dirty hacky way to do it of course but it works.

You could do “rcon quit” after entering your rcon password if it’s enabled or you can run quit in the server’s console. Another thing you can do is change map to the current map though that doesn’t always reload everything.

Lastly you can add a command with co command.add that only super admins can run called restartserver that runs quit serverside.

Isn’t “quit” blacklisted? And he already said that changing map isn’t an option because new legacy addon directories won’t get registered this way.

I don’t think quit is black listed to the server since it wouldn’t make much sense to do that. Some example I coded from my phone and didn’t test is this:
[lua]concommand.Add( “rebootserver”, function( ply )
if SERVER then
game.ConsoleCommand( "quit
" )
end )[/lua]

Might work but not sure. It might just shut off the server and not turn it back on. You can do the same with removing the world someone mentioned earlier.

I believe I tried this multiple times before when I still had my server and it didn’t work. And it was me who suggested removing the world :v:, that’s how I was doing this anyway.

“quit” is blacklisted, you can kill the server using “_restart” though.

Ye but that won’t restart it xP