Author Topic: completely restarting server  (Read 1189 times)

0 Members and 1 Guest are viewing this topic.

Offline -Snowy-

  • Major(1)
  • Posts: 44
    • Snowy
completely restarting server
« on: December 27, 2007, 10:15:55 am »
ive looked around and ive seen that a few people get the occasional access violation spamming in their server, the scripts stop working, people dont die, etc etc. what im wanting to do is make it so the server completely restarts, scripts and all, when an error such as this occurs. so i get the onexception procedure happening, then i add a shutdown and startserver function in it, but the problem is that once you shutdown the server, you cant use the startserver function (why it exists in the first place when u can never use it, i dont know). ive searched for 'restart onexception' and 'restart scripts' but i havnt found anything. is there any way i could go about reloading the entire server, at all?

and @ enesce, make shutdown; stop the server, but not close the process so it can be started again (its the whole reason im having this problem)

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat
Re: completely restarting server
« Reply #1 on: December 27, 2007, 10:22:26 am »
I'd imagine you can do this using on exception and then making a call to the system command line to call an outside program which will make sure the server is stopped and then restart it.

Offline -Snowy-

  • Major(1)
  • Posts: 44
    • Snowy
Re: completely restarting server
« Reply #2 on: December 27, 2007, 10:26:54 am »
yeah, i try to sound like i know what im talkin about, but i only just started using pascal and i have no idea how to do that. it would be so much damn easier if the process didnt close

Offline Toumaz

  • Veteran
  • *****
  • Posts: 1906
Re: completely restarting server
« Reply #3 on: December 27, 2007, 10:33:27 am »
You could use OnScriptCrash=shutdown in the network section of server.ini instead and then rely on some sort of server monitor script to restart it for you.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: completely restarting server
« Reply #4 on: December 27, 2007, 11:57:08 am »
Doesn't /recompile fix the server?
You could do /recompile, /nextmap or /restart, and stuff under OnException
not sure if it'll work tho..

Offline Toumaz

  • Veteran
  • *****
  • Posts: 1906
Re: completely restarting server
« Reply #5 on: December 27, 2007, 11:59:03 am »
Doesn't /recompile fix the server?
In some cases a script can lock the server up completely, disallowing any and all commands to be executed.

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat
Re: completely restarting server
« Reply #6 on: December 27, 2007, 11:59:12 am »
yeah, i try to sound like i know what im talkin about, but i only just started using pascal and i have no idea how to do that. it would be so much damn easier if the process didnt close

uh, you're talking about "completely restarting the server" therefore the process has to close

Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: completely restarting server
« Reply #7 on: December 27, 2007, 05:11:55 pm »
could you start the server first, then shutdown?
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs