[Linux] Use a Worldserver restart for your WoW Private Server

ExO

Admin
5,094
2014
1,454
Another Linux guide.

This one shows you how to setup an automatic worldserver restarter for your wow private server.

This means that your Linux server will automatically restart upon crashes / server restarts.

1) Create a file called eg. restarter.sh
Insert the following in the file:
#!/bin/bash
while :
do
./worldserver
sleep 5
done

2) Save the file, remember to save it as .sh (like .bat)

3) Use this .sh file on your screen session eg.
Tutorial below:
https://www.emucoach.com/showthread.php/4410-Linux-How-to-start-a-screen-session-WoW-Server
 

ontop500

Verified Member
10
2016
0
You'd probably want to check if process exist before calling the restart so you better create a file called process_check.sh
#!/bin/bash
while true; do
cd /path/to/your/server/bin
./worldserver
wait
done

then create the restart session and make it into a screen, so restart.sh would look like
#!/bin/bash
SESSION="worldserver"
now="$(date)"
DAEMON="screen -A -m -d -S $SESSION /path/to/your/server/bin/process_check.sh"
screen -r $SESSION -ls -q 2>&1 >/dev/null
if [ $? -le 10 ]; then
echo "\n[$now]: $DAEMON has been launched into the background.\n"
$DAEMON
fi
wait
 
Top