UltimatusVirsus

Instalar servidor Source BASH

Nov 21st, 2021 (edited)
1,559
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.84 KB | None | 0 0
  1. # Instalador automatico de servidores creado por vicentefelipechile
  2. # Agradecimientos especiales a nahu por ayudar a crear este bash
  3. #
  4. # Dependencias:
  5. # sudo dpkg --add-architecture i386
  6. # sudo apt-get update
  7. # sudo apt-get install lib32z1 libncurses5:i386 libbz2-1.0:i386 lib32gcc1 lib32stdc++6 libtinfo5:i386 libcurl3-gnutls:i386
  8. #
  9. # En caso de usar Debian 10 para usar este bash, instalen las siguientes apps:
  10. # sudo apt install wget screen dos2unix neofetch git
  11. #
  12. # Si estan utilizandon el servicio de Oracle deben colocar los siguientes comandos para abrir los puertos:
  13. # sudo apt install firewalld
  14. # sudo firewall-cmd --permanent --zone=public --add-port=27015/tcp
  15. # sudo firewall-cmd --permanent --zone=public --add-port=27015/udp
  16. # sudo firewall-cmd --reload
  17. #
  18. echo -e '\0033\0143'
  19. echo -e "--------------------------------------------------"
  20. echo -e "--- Instalador Automatico de Servidores Source ---"
  21. echo -e "--------------------------------------------------"
  22. echo ""
  23. echo Descargando SteamCMD...
  24. echo ""
  25. # -
  26. Steamcmd=./Steam/steamcmd.sh
  27. if [[ -f "$Steamcmd" ]]; then
  28.         echo -e "SteamCMD ya esta descargado!"
  29.         echo Saltando paso...
  30.         echo ""
  31. else
  32.         mkdir Steam && cd Steam
  33.         wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz && tar zxf steamcmd_linux.tar.gz && rm steamcmd_linux.tar.gz
  34.         cd ..
  35. fi
  36. # -
  37. read -p "Presiona una tecla para continuar"
  38. echo -e '\0033\0143'
  39. echo -e "--------------------------------------------------"
  40. echo -e "--- Instalador Automatico de Servidores Source ---"
  41. echo -e "--------------------------------------------------"
  42. echo ""
  43. # -
  44. echo Creando un archivo que actualize el servidor
  45. echo -E "Lista del parametro +app_update segun su juego (Solo motor Source):"
  46. echo ""
  47. echo -E "Team Fortress 2                = 232250"
  48. echo -E "Counter Strike: Source         = 232330"
  49. echo -E "Counter Strike: Global Offensive   = 740"
  50. echo -E "Garrys Mod             = 4020"
  51. echo -E "Half Life 2: Deathmatch            = 232370"
  52. echo -E "Half Life Source: Deathmatch       = 255470"
  53. echo -E "Day Of Defeat Source           = 232290"
  54. echo -E "Left 4 Dead 2              = 222860"
  55. echo -E "Left 4 Dead                = 222840"
  56. # -
  57. echo ""
  58. echo Introduce la ID del juego:
  59. echo ""
  60. read APPID
  61. echo ./Steam/steamcmd.sh +force_install_dir ./../servidor +login anonymous +app_update $APPID +quit > update.sh
  62. chmod +x update.sh
  63. # -
  64. read -p "Presiona una tecla para continuar"
  65. echo -e '\0033\0143'
  66. echo -e "--------------------------------------------------"
  67. echo -e "--- Instalador Automatico de Servidores Source ---"
  68. echo -e "--------------------------------------------------"
  69. echo ""
  70.  # -
  71. echo Iniciar servidor
  72. echo -E "Lista del parametro -game segun su juego (Solo motor Source):"
  73. echo ""
  74. echo -E "Team Fortress 2                = tf"
  75. echo -E "Counter Strike: Source         = cstrike"
  76. echo -E "Counter Strike: Global Offensive   = csgo"
  77. echo -E "Garrys Mod             = garrysmod"
  78. echo -E "Half Life 2: Deathmatch            = hl2dm"
  79. echo -E "Half Life Source: Deathmatch       = hl1mp"
  80. echo -E "Day Of Defeat Source           = dods"
  81. echo -E "Left 4 Dead 2              = left4dead2"
  82. echo -E "Left 4 Dead                = left4dead"
  83. # -
  84. echo ""
  85. echo Introduce el juego:
  86. read GAME
  87. echo ""
  88. echo Introduce el mapa:
  89. read MAP
  90. echo ""
  91. echo Introduce la cantidad de jugadores:
  92. read MAXP
  93. # -
  94. if (( $APPID == 4020 ))
  95. then
  96.         echo ""
  97.         echo -e "Juego: 'Garrys Mod' Detectado"
  98.         echo -e "Introduce ID de Administracion de Cuentas de Juegos (https://steamcommunity.com/dev/managegameservers):"
  99.         read ADMINID
  100.         echo ""
  101.         echo Introduce coleccion de Workshop:
  102.         read WS
  103.         #
  104.         echo ./servidor/srcds_run -console -game $GAME +map $MAP +maxplayers $MAXP +host_workshop_collection $WS +sv_setsteamaccount $ADMINID > start.sh
  105. else
  106.         echo ./servidor/srcds_run -console -game $GAME +map $MAP +maxplayers $MAXP > start.sh
  107. fi
  108. chmod +x start.sh
Advertisement
Add Comment
Please, Sign In to add comment