Loading...   


#!/bin/sh

#ulimit -c 999999
ulimit -c unlimited

$FILE = "db_update.pl";
if [ -f $FILE]; then
	perl ./db_update.pl ran_from_start
else
	wget "https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/db_update.pl"  
	perl ./db_update.pl ran_from_start
fi

rm -f .zone_shutdown 
rm -f .world_shutdown

set -x

LNAME="zone"     #launcher name
if [ "$1" = "test" ]; then
        LNAME="test"
fi

P=`pwd`
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$P"

#export MALLOC_CHECK_=0

#make sure we have a place to log
mkdir -p logs 2>&1 > /dev/null

#clear out old logs, if both are stopped
if [ ! -e .lock-zones -a ! -e .lock-world ] ; then
  for f in logs/eqemu_*.log
  do
        if [ "$f" = "logs/eqemu_commands_zone.log" ]; then
                continue;
        fi

        rm -f $f
  done
fi

#boot up world
if [ ! -e .lock-world ] ; then
        touch .lock-world
        ./shared_memory &
        ./ucs &
        ./queryserv &
        #./world 2>&1 > logs/world &
        #./persist_world 2>&1 > logs/world &
        ./persist_world &
        # wait for shared memory to load
        sleep 15
fi

#start up the official launcher
if [ ! -e .lock-launcher ]; then
        touch .lock-launcher
        ./eqlaunch $LNAME 2>&1 > logs/launcher &
fi

Raw Paste Data