Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. #!/bin/bash
  2. # Garry's Mod Installation Script
  3. #
  4. # Server Files: /mnt/server
  5. apt -y update
  6. apt -y --no-install-recommends install curl lib32gcc1 ca-certificates
  7.  
  8. cd /tmp
  9. curl -sSL -o steamcmd.tar.gz http://media.steampowered.com/installer/steamcmd_linux.tar.gz
  10.  
  11. mkdir -p /mnt/server/steamcmd
  12. tar -xzvf steamcmd.tar.gz -C /mnt/server/steamcmd
  13. cd /mnt/server/steamcmd
  14.  
  15. # SteamCMD fails otherwise for some reason, even running as root.
  16. # This is changed at the end of the install process anyways.
  17. chown -R root:root /mnt
  18.  
  19. export HOME=/mnt/server
  20. ./steamcmd.sh +login anonymous +force_install_dir /mnt/server +app_update 4020 +quit
  21.  
  22. mkdir -p /mnt/server/.steam/sdk32
  23. cp -v linux32/steamclient.so ../.steam/sdk32/steamclient.so
  24.  
  25. # Installing CSS
  26. cd /mnt/server
  27. curl -O https://www.rebootservers.com/resources/cstrike.tar.gz
  28. tar -xzvf cstrike.tar.gz
  29.  
  30.  
  31.  
  32. # Creating needed default files for the game
  33. cd /mnt/server/garrysmod/lua/autorun/server
  34. echo '
  35. -- Docs: https://wiki.garrysmod.com/page/resource/AddWorkshop
  36. -- Place the ID of the workshop addon you want to be downloaded to people who join your server, not the collection ID
  37. -- Use https://beta.configcreator.com/create/gmod/resources.lua to easily create a list based on your collection ID
  38.  
  39. resource.AddWorkshop( "" )
  40. ' > workshop.lua
  41.  
  42. cd /mnt/server/garrysmod/cfg
  43. echo '
  44. // Please do not set RCon in here, use the startup parameters.
  45.  
  46. hostname "New Gmod Server"
  47. sv_password ""
  48. sv_loadingurl ""
  49.  
  50. // Steam Server List Settings
  51. sv_region "255"
  52. sv_lan "0"
  53. sv_max_queries_sec_global "30000"
  54. sv_max_queries_window "45"
  55. sv_max_queries_sec "5"
  56.  
  57. // Server Limits
  58. sbox_maxprops 100
  59. sbox_maxragdolls 5
  60. sbox_maxnpcs 10
  61. sbox_maxballoons 10
  62. sbox_maxeffects 10
  63. sbox_maxdynamite 10
  64. sbox_maxlamps 10
  65. sbox_maxthrusters 10
  66. sbox_maxwheels 10
  67. sbox_maxhoverballs 10
  68. sbox_maxvehicles 20
  69. sbox_maxbuttons 10
  70. sbox_maxsents 20
  71. sbox_maxemitters 5
  72. sbox_godmode 0
  73. sbox_noclip 0
  74.  
  75. // Network Settings - Please keep these set to default.
  76.  
  77. sv_minrate 75000
  78. sv_maxrate 0
  79. gmod_physiterations 2
  80. net_splitpacket_maxrate 45000
  81. decalfrequency 12
  82.  
  83. // Execute Ban Files - Please do not edit
  84. exec banned_ip.cfg
  85. exec banned_user.cfg
  86.  
  87. // Add custom lines under here
  88. ' > server.cfg
  89.  
  90. echo '
  91. //
  92. // Use this file to mount additional paths to the filesystem
  93. // DO NOT add a slash to the end of the filename
  94. //
  95.  
  96. "mountcfg"
  97. {
  98. "cstrike" "/home/container/cstrike"
  99. // "tf" "C:\mytf2server\tf"
  100. }
  101.  
  102. ' > mount.cfg
  103.  
  104.  
  105. # Cleanup
  106. cd /mnt/server
  107. rm cstrike.tar.gz
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement