Browse Source

Merge pull request #1661 from GameServerManagers/feature/minorstuff

Minor improvements
pull/1682/head
Daniel Gibbs 8 years ago
committed by GitHub
parent
commit
9d87c01e82
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      lgsm/config-default/config-lgsm/csgoserver/_default.cfg
  2. 7
      lgsm/config-default/config-lgsm/zpsserver/_default.cfg
  3. 2
      lgsm/functions/alert_mailgun.sh
  4. 12
      lgsm/functions/fix_csgo.sh
  5. 2
      lgsm/functions/info_distro.sh
  6. 2
      lgsm/functions/update_factorio.sh
  7. 10
      linuxgsm.sh

3
lgsm/config-default/config-lgsm/csgoserver/_default.cfg

@ -11,11 +11,12 @@
## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters
# https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers#Starting_the_Server
# [Game Modes] gametype gamemode
# Arms Race 1 0
# Classic Casual 0 0
# Classic Competitive 0 1
# Arms Race 1 0
# Demolition 1 1
# Deathmatch 1 2
# Custom 3 0
gametype="0"
gamemode="0"
mapgroup="mg_active"

7
lgsm/config-default/config-lgsm/zpsserver/_default.cfg

@ -16,14 +16,9 @@ sourcetvport="27020"
defaultmap="zps_deadend"
maxplayers="20"
## Optional: Game Server Login Token
# GSLT can be used for running a public server.
# More info: https://gameservermanagers.com/gslt
gslt=""
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
fn_parms(){
parms="-game zps -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
parms="-game zps -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
}
#### LinuxGSM Settings ####

2
lgsm/functions/alert_mailgun.sh

@ -11,7 +11,7 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_print_dots "Sending Email alert: Mailgun: ${email}"
sleep 0.5
mailgunsend=$(curl -s --user "api:${mailguntoken}" \
mailgunsend=$(${curlpath} -s --user "api:${mailguntoken}" \
-F from="LinuxGSM <${mailgunemailfrom}>" \
-F to="LinuxGSM Admin <${mailgunemail}>" \
-F subject="${alertemoji} ${alertsubject} ${alertemoji}" \

12
lgsm/functions/fix_csgo.sh

@ -17,19 +17,19 @@ if [ ! -f "${serverfiles}/steam_appid.txt" ]; then
fi
# Fixes: Error parsing BotProfile.db - unknown attribute 'Rank'".
if ! grep -q "//Rank" "${systemdir}/botprofile.db" > /dev/null 2>&1; then
if [ -f "${systemdir}/botprofile.db" ] && grep "^\s*Rank" "${systemdir}/botprofile.db" > /dev/null 2>&1; then
fixname="botprofile.db"
fn_fix_msg_start
sed -i 's/\tRank/\t\/\/Rank/g' "${systemdir}/botprofile.db" > /dev/null 2>&1
sed -i 's/^\s*Rank/\t\/\/Rank/g' "${systemdir}/botprofile.db" > /dev/null 2>&1
fn_fix_msg_end
fi
# Fixes: Unknown command "cl_bobamt_vert".
if ! grep -q "//exec default" "${servercfgdir}/valve.rc" > /dev/null 2>&1 || ! grep -q "//exec joystick" "${servercfgdir}/valve.rc" > /dev/null 2>&1; then
# Fixes: Unknown command "cl_bobamt_vert" and exec: couldn't exec joystick.cfg.
if [ -f "${servercfgdir}/valve.rc" ] && grep -E '^\s*exec\s*(default|joystick)\.cfg' "${servercfgdir}/valve.rc" > /dev/null 2>&1; then
fixname="valve.rc"
fn_fix_msg_start
sed -i 's/exec default.cfg/\/\/exec default.cfg/g' "${servercfgdir}/valve.rc" > /dev/null 2>&1
sed -i 's/exec joystick.cfg/\/\/exec joystick.cfg/g' "${servercfgdir}/valve.rc" > /dev/null 2>&1
sed -i 's/^\s*exec\s*default.cfg/\/\/exec default.cfg/g' "${servercfgdir}/valve.rc" > /dev/null 2>&1
sed -i 's/^\s*exec\s*joystick.cfg/\/\/exec joystick.cfg/g' "${servercfgdir}/valve.rc" > /dev/null 2>&1
fn_fix_msg_end
fi

2
lgsm/functions/info_distro.sh

@ -136,5 +136,5 @@ fi
# External IP address
if [ -z "${extip}" ];then
extip=$(curl -m 3 ifconfig.co 2>/dev/null)
extip=$(${curlpath} -m 3 ifconfig.co 2>/dev/null)
fi

2
lgsm/functions/update_factorio.sh

@ -76,7 +76,7 @@ fn_update_factorio_arch(){
fn_update_factorio_availablebuild(){
# Gets latest build info.
availablebuild=$(curl -s https://www.factorio.com/download-headless/"${branch}" | grep 'headless/linux64' | head -n 1 | grep -oP '(?<=get-download/).*?(?=/)')
availablebuild=$(${curlpath} -s https://www.factorio.com/download-headless/"${branch}" | grep 'headless/linux64' | head -n 1 | grep -oP '(?<=get-download/).*?(?=/)')
sleep 1
# Checks if availablebuild variable has been set

10
linuxgsm.sh

@ -229,9 +229,9 @@ fn_install_getopt(){
echo "https://gameservermanagers.com"
echo -e ""
echo -e "Commands"
echo -e "install |Select server to install."
echo -e "servername |e.g $0 csgoserver. Enter the required servername will install it."
echo -e "list |List all servers available for install."
echo -e "install\t\t| Select server to install."
echo -e "servername\t| e.g $0 csgoserver. Enter name of server/game to install."
echo -e "list\t\t| List all servers available for install."
exit
}
@ -303,8 +303,10 @@ if [ "${shortname}" == "core" ]; then
fi
elif [ -n "${userinput}" ]; then
fn_server_info
if [ "${userinput}" == "${gameservername}" ]; then
if [ "${userinput}" == "${gameservername}" ]||[ "${userinput}" == "${gamename}" ]||[ "${userinput}" == "${shortname}" ]; then
fn_install_file
else
echo "[ FAIL ] unknown game server"
fi
else
fn_install_getopt

Loading…
Cancel
Save