Advertisement
dropbox1349

./hlds_run: line 255: 2057 Segmentation fault $HL_CMD

Feb 9th, 2017
479
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. run() {
  2. # Runs the steam update and server
  3. # Loops if RESTART is set
  4. # Debugs if server failure is detected
  5. # Note: if RESTART is not set then
  6. # 1. DEBUG is set then the server is NOT exec'd
  7. # 2. DEBUG is not set the the server is exec'd
  8.  
  9. if test -n "$RESTART" ; then
  10. echo "Auto-restarting the server on crash"
  11.  
  12. #loop forever
  13. while true
  14. do
  15. # Update if needed
  16. update
  17.  
  18. # Run the server
  19. $HL_CMD
  20. retval=$?
  21. if test $retval -eq 0 && test -z "$RESTART" ; then
  22. break; # if 0 is returned then just quit
  23. fi
  24.  
  25. debugcore $retval
  26.  
  27. echo "`date`: Server restart in $TIMEOUT seconds"
  28.  
  29. # don't thrash the hard disk if the server dies, wait a little
  30. sleep $TIMEOUT
  31. done # while true
  32. else
  33. # Update if needed
  34. update
  35.  
  36. # Run the server
  37. if test "$DEBUG" -eq 0; then
  38. # debug not requested we can exec
  39. exec $HL_CMD
  40. else
  41. # debug requested we can't exec
  42. $HL_CMD
  43. debugcore $?
  44. fi
  45. fi
  46. }
  47.  
  48. quit() {
  49. # Exits with the give error code, 1
  50. # if none specified.
  51. # exit code 2 also prints syntax
  52. exitcode="$1"
  53.  
  54. # default to failure
  55. if test -z "$exitcode"; then
  56. exitcode=1
  57. fi
  58.  
  59. case "$exitcode" in
  60. 0)
  61. echo "`date`: Server Quit" ;;
  62. 2)
  63. syntax ;;
  64. *)
  65. echo "`date`: Server Failed" ;;
  66. esac
  67.  
  68. # Remove pid file
  69. if test -n "$PID_FILE" && test -f "$PID_FILE" ; then
  70. # The specified pid file
  71. rm -f $PID_FILE
  72. fi
  73.  
  74. # reset SIGINT and then kill ourselves properly
  75. trap - 2
  76. kill -2 $$
  77. }
  78.  
  79. # Initialise
  80. init $*
  81.  
  82. # Run
  83. run
  84.  
  85. # Quit normally
  86. quit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement