Browse Source

Added fn_debugserver

pull/254/merge
Daniel Gibbs 11 years ago
parent
commit
171d18b1aa
  1. 50
      functions/fn_debugserver

50
functions/fn_debugserver

@ -0,0 +1,50 @@
#!/bin/bash
# LGSM fn_debugserver function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 121114
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:"
echo ${executable} ${parms}
echo ""
echo -e "Use for identifying server issues only!"
echo -e "Press CTRL+c to drop out of debug mode"
echo -e "\e[0;31mWARNING!\e[0;39m 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_stopserver
fn_printdots "Starting debug mode ${servicename}: ${servername}"
sleep 1
fn_printok "Starting debug mode ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Started debug mode ${servername}"
echo -en "\n"
cd "${executabledir}"
if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
${executable} ${parms} -debug
else
${executable} ${parms}
fi
Loading…
Cancel
Save