Advertisement
illwieckz

server script

Mar 13th, 2017
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.83 KB | None | 0 0
  1. #! /bin/sh
  2.  
  3. alias debug=false
  4.  
  5. homepath="${HOME}/.unvanquished"
  6. wwwpath="/somewhere"
  7. ${HOME}/rotatelog.sh "${homepath}"
  8.  
  9. cat > "${HOME}/command.gdb" <<EOF
  10. set logging file ${HOME}/gdb/gdb.log-$(date +%Y%m%d-%H%M%S)
  11. set logging redirect on
  12. set logging on
  13. set backtrace limit 0
  14. set breakpoint pending on
  15. break Com_Error
  16. run
  17. thread apply all bt
  18. quit
  19. EOF
  20.  
  21. if debug
  22. then
  23.     alias run_daemon="gdb --batch --quiet --command='${HOME}/command.gdb' --args ./daemonded -set vm.sgame.type 0"
  24. else
  25.     alias run_daemon="./daemonded -set vm.sgame.type 1"
  26. fi
  27.  
  28. cd ${HOME}/unvanquished;
  29. run_daemon \
  30.     -homepath "${homepath}" \
  31.     -pakpath "${HOME}/unvanquished/pkg" \
  32.     -pakpath "${wwwpath}/unvanquished/pkg" \
  33.     -pakpath "${wwwpath}/unvanquished/pkg/trem" \
  34.     -set net_port 27960 \
  35.     -set logs.logFile.overwrite 0 \
  36.     +exec server.cfg
  37.  
  38. #EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement