Преглед изворни кода

Merge pull request #406 from xFaNaTiix/master

A few fixes and additions
Daniel Gibbs пре 11 година
родитељ
комит
864b566ca0
4 измењених фајлова са 12 додато и 6 уклоњено
  1. 2 2
      Left4Dead/l4dserver
  2. 2 2
      functions/fn_console
  3. 5 1
      functions/fn_install_glibcfix
  4. 3 1
      functions/fn_stop

+ 2 - 2
Left4Dead/l4dserver

@@ -4,7 +4,7 @@
 # Author: Daniel Gibbs
 # Contributor: Summit Singh Thakur
 # Website: http://gameservermanagers.com
-# Version: 090515
+# Version: 260515
 
 #### Variables ####
 
@@ -27,7 +27,7 @@ updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){
-parms="-game left4dead -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
+parms="-game left4dead -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} -tickrate ${tickrate} +map ${defaultmap} -maxplayers ${maxplayers}"
 }
 
 #### Advanced Variables ####

+ 2 - 2
functions/fn_console

@@ -17,7 +17,7 @@ echo "Press \"CTRL+b d\" to exit console."
 fn_printwarningnl "Do NOT press CTRL+c to exit."
 echo ""
 while true; do
-	read -p "Continue? [y/N]" yn
+	read -e -i "y" -p "Continue? [y/N]" yn
 	case $yn in
 	[Yy]* ) break;;
 	[Nn]* ) echo Exiting; return 1;;
@@ -45,4 +45,4 @@ else
 		* ) echo "Please answer yes or no.";;
 	esac
 	done
-fi
+fi

+ 5 - 1
functions/fn_install_glibcfix

@@ -84,6 +84,10 @@ elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 215
 		wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/raw/master/Insurgency/dependencies/libm.so.6
 		wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/raw/master/Insurgency/dependencies/librt.so.1
 		wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/raw/master/Insurgency/dependencies/libpthread.so.0
+	elif [ "${gamename}" == "Left 4 Dead" ]; then
+		glibcversion="2.07"
+		fn_glibcfixmsg
+		cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/bin/libstdc++.so.6"
 	# Natural Selection 2
 	elif [ "${gamename}" == "Natural Selection 2" ]; then
 		glibcversion="2.15"
@@ -122,4 +126,4 @@ elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 215
 		: #Else glibcfix not required.
 	fi
 fi
-sleep 1
+sleep 1

+ 3 - 1
functions/fn_stop

@@ -129,6 +129,8 @@ else
         fn_scriptlog "Stopped ${servername}"
     fi
 fi
+    # Remove lock file
+    rm -f "${rootdir}/${lockselfname}"
     sleep 1
     echo -en "\n"
 }
@@ -137,4 +139,4 @@ if [ "${gamename}" == "Teamspeak 3" ]; then
     fn_stop_teamspeak3
 else
     fn_stop_tmux
-fi
+fi