TrinityCore Launch Script for Linux

Here is an example of a primitive TrinityCore restart script for Linux:

Create the first file with the contents:

while :; do
/home/trinity/release/bin/authserver -c /home/trinity/release/etc/authserver.conf
sleep 10

It will start the authentication server. If it works without errors, then in /etc/rc.local you can specify the path to this file so that it loads at system startup.

Create a second file with the contents:

if [ `ps ax | grep "$srvrun" | grep -v "grep" | wc -l` = 0 ]; then
   kill `ps xu | grep "$srvname" | grep "$srvrun" | grep -v "grep" | awk '{print $2}'`
   echo "Server CRASHED !!! Start Bugreport System" `date` >> $outfile
   echo "Server.log Log FILE Last 30 Lines:" >> $outfile
   cat $logfile | tail -n 30 >> $outfile
   echo "END bugtracker system." >> $outfile
   sleep 20 && $srvrun
exit 0

The game server will be launched on it. You can run through the screen command:

screen -AmdS world /home/trinity/release/bin/

Leave a comment

Leave a Reply