Author Topic: Linux/Debian nwserver Restart Script  (Read 648 times)

Legacy_Ne0nx3r0

  • Newbie
  • *
  • Posts: 46
  • Karma: +0/-0
Linux/Debian nwserver Restart Script
« on: September 20, 2010, 05:44:32 pm »


               I'm positive this has already been answered, but I can't seem to find this... ':whistle:'

Does anyone have an example of a shell script that will restart nwserver when it crashes?

Basically your standard
:start
startnwserver
GOTO start

but as a shell script. 
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Linux/Debian nwserver Restart Script
« Reply #1 on: September 20, 2010, 07:46:04 pm »


               nope, what about NWNX?
               
               

               
            

Legacy_Ne0nx3r0

  • Newbie
  • *
  • Posts: 46
  • Karma: +0/-0
Linux/Debian nwserver Restart Script
« Reply #2 on: September 20, 2010, 08:14:49 pm »


               

ShaDoOoW wrote...

nope, what about NWNX?


You know I'm using NWNX, which is basically the only reason I use Linux. The issue here is that nwserver will occasionally crash during module reloads, and NWNX doesn't seem inclined to restart it at that point.

Still investigating what caused it to crash a few times, but I'd like it if the server could just get back up if something does go wrong. I had a script that did this just fine, but that was before my obsessive archiving of everything code in gmail days.

After reorganizing my thoughts and boolean logic I came up with:
while true; do
./nwnstartup.sh
done

Not the fanciest way, but it does the job just the same.
               
               

               


                     Modifié par Ne0nx3r0, 20 septembre 2010 - 07:15 .
                     
                  


            

Legacy_Ravine_HU

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
Linux/Debian nwserver Restart Script
« Reply #3 on: September 20, 2010, 08:18:46 pm »


               Hello!

This is mine:
tj.jgypk.hu/nwn/snwn.txt 

Nwnx can restart the server, but the nwserver process won't restart automagically. And in the case of a crash, it comes handy '<img'>

However, you can delete most of the lines, i use backups.
               
               

               
            

Legacy_Ne0nx3r0

  • Newbie
  • *
  • Posts: 46
  • Karma: +0/-0
Linux/Debian nwserver Restart Script
« Reply #4 on: September 21, 2010, 02:30:54 am »


               Very cool, I'll definitely take a look at integrating some parts of that into what I have. Thanks!