| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #!/bin/bash
- # LGSM fn_debugserver function
- # Author: Daniel Gibbs
- # Website: http://danielgibbs.co.uk
- # Version: 010115
- # Description: Runs the server without tmux. Runs direct from the terminal.
- local modulename="Debug"
- fn_rootcheck
- fn_syscheck
- fn_autoip
- fn_distro
- fn_uptime
- fn_load
- fn_parms
- echo ""
- echo "${gamename} Debug"
- echo "============================"
- echo ""
- echo -e "Distro: ${os}"
- echo -e "Arch: ${arch}"
- echo -e "Kernel: ${kernel}"
- echo -e "Hostname: $HOSTNAME"
- echo ""
- echo "Start parameters:"
- if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
- echo "${executable} ${parms} -debug"
- else
- echo "${executable} ${parms}"
- fi
- echo ""
- echo -e "Use for identifying server issues only!"
- echo -e "Press CTRL+c to drop out of debug mode."
- fn_printwarningnl "If ${servicename} is already running it will be stopped."
- echo ""
- while true; do
- read -p "Continue? [y/N]" yn
- case $yn in
- [Yy]* ) break;;
- [Nn]* ) echo Exiting; return 1;;
- * ) echo "Please answer yes or no.";;
- esac
- done
- fn_scriptlog "Starting debug"
- fn_printinfonl "Stopping any running servers"
- fn_scriptlog "Stopping any running servers"
- sleep 1
- fn_stopserver
- fn_printdots "Starting debug"
- sleep 1
- fn_printok "Starting debug"
- fn_scriptlog "Started debug"
- sleep 1
- echo -en "\n"
- cd "${executabledir}"
- if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
- ${executable} ${parms} -debug
- else
- ${executable} ${parms}
- fi
|