mackal

EQEmu start script

Jun 8th, 2012
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.03 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. #ulimit -c 99999999
  4.  
  5. rm -f .zone_shutdown
  6. rm -f .world_shutdown
  7.  
  8. set -x
  9.  
  10. LNAME="zone"     #launcher name
  11. if [ "$1" = "test" ]; then
  12.         LNAME="test"
  13. fi
  14.  
  15. P=`pwd`
  16. export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$P"
  17.  
  18. #make sure we have a place to log
  19. mkdir -p logs 2>&1 > /dev/null
  20.  
  21. #clear out old logs, if both are stopped
  22. if [ ! -e .lock-zones -a ! -e .lock-world ] ; then
  23.   for f in logs/eqemu_*.log
  24.   do
  25.         if [ "$f" = "logs/eqemu_commands_zone.log" ]; then
  26.                 continue;
  27.         fi
  28.  
  29.         rm -f $f
  30.   done
  31. fi
  32.  
  33. #boot up world
  34. if [ ! -e .lock-world ] ; then
  35.         touch .lock-world
  36. #       ./world 2>&1 > logs/world &
  37.         ./persist_world 2>&1 > logs/world &
  38.         # wait for shared memory to load
  39.         sleep 15
  40. fi
  41.  
  42. #boot up UCS
  43. if [ ! -e .lock-ucs ] ; then
  44.         touch .lock-ucs
  45.         ./ucs 2>&1 > logs/ucs &
  46. fi
  47.  
  48. #start up the official launcher
  49. if [ ! -e .lock-launcher ]; then
  50.         touch .lock-launcher
  51.         ./eqlaunch $LNAME 2>&1 > logs/launcher &
  52. fi
Advertisement
Add Comment
Please, Sign In to add comment