Author: root Language: text
Description: Not specified Timestamp: 2019-07-12 02:57:07 +0000
Expires: 2019-07-19 02:57:07 +0000
View raw paste Reply
  1. #!/bin/bash
  2. set -x
  3.  
  4. cp /etc/apt/sources.list /etc/apt/sources.list.bak
  5.  
  6. echo 'deb http://deb.debian.org/debian stretch main non-free' >> /etc/apt/sources.list
  7.  
  8. dpkg --add-architecture i386
  9.  
  10. apt-get update
  11.  
  12. apt-get -y install steamcmd
  13.  
  14. rm /etc/apt/sources.list
  15. mv /etc/apt/sources.list.bak /etc/apt/sources.list
  16. apt-get update
  17.  
  18. apt-get -y install python3 python3-dev build-essential git redis-server supervisor
  19.  
  20. service redis-server stop
  21. service supervisor stop
  22.  
  23. wget https://bootstrap.pypa.io/get-pip.py
  24. python3 get-pip.py
  25. rm get-pip.py
  26.  
  27. /usr/games/steamcmd +quit
  28. /usr/games/steamcmd +login anonymous +force_install_dir /home/qlds/27960/ +app_update 349090 +quit
  29.  
  30. mkdir /home/qlds/27960/steamapps/
  31. mkdir /home/qlds/27960/steamapps/workshop/
  32. mkdir /home/qlds/27960/steamapps/workshop/content/
  33. mkdir /home/qlds/27960/steamapps/workshop/content/282440/
  34.  
  35. mkdir /tmp/minqlx/
  36. cd /tmp/minqlx/
  37.  
  38. git clone https://github.com/MinoMino/minqlx.git /tmp/minqlx
  39.  
  40. make
  41.  
  42. cd /
  43.  
  44. mv /tmp/minqlx/bin/minqlx.x64.so /home/qlds/27960/minqlx.x64.so
  45.  
  46. mv /tmp/minqlx/bin/minqlx.zip /home/qlds/27960/minqlx.zip
  47.  
  48. mv /tmp/minqlx/bin/run_server_x64_minqlx.sh /home/qlds/27960/run_server_x64_minqlx.sh
  49.  
  50. rm -r /tmp/minqlx/
  51.  
  52. git clone https://github.com/MinoMino/minqlx-plugins.git /home/qlds/27960/minqlx-plugins
  53.  
  54. python3 -m pip install -r /home/qlds/27960/minqlx-plugins/requirements.txt
  55.  
  56. #################################################################################################
  57. cp -a /home/qlds/27960/. /home/qlds/27961/
  58. cp -a /home/qlds/27960/. /home/qlds/27962/
  59. #################################################################################################
  60.  
  61. cp /etc/redis/redis.conf /etc/redis/redis.conf.bak
  62. mkdir /var/run/redis
  63.  
  64. sed -i -e 's/port 6379/port 0/g' /etc/redis/redis.conf
  65. sed -i -e 's/# unixsocket /unixsocket /g' /etc/redis/redis.conf
  66. sed -i -e 's/ \/tmp\/redis.sock/ \/var\/run\/redis\/redis.sock/g' /etc/redis/redis.conf
  67. sed -i -e 's/# unixsocketperm 700/unixsocketperm 777/g' /etc/redis/redis.conf
  68.  
  69. cp /etc/supervisor/supervisord.conf /etc/supervisor/supervisord.conf.bak
  70. sed -i -e 's/\[supervisord\]/\[supervisord\]\nuser=root/g' /etc/supervisor/supervisord.conf
  71.  
  72. echo '[program:ql60]' >> /etc/supervisor/conf.d/ql60.conf
  73. echo 'command=/usr/bin/nice -n -10 /usr/bin/ionice -c 1 -n 4 /home/qlds/27960/run_server_x64_minqlx.sh' >> /etc/supervisor/conf.d/ql60.conf
  74. echo 'directory=/home/qlds/27960/' >> /etc/supervisor/conf.d/ql60.conf
  75. echo 'user=root' >> /etc/supervisor/conf.d/ql60.conf
  76. echo 'autostart=true' >> /etc/supervisor/conf.d/ql60.conf
  77. echo 'autorestart=true' >> /etc/supervisor/conf.d/ql60.conf
  78. echo 'startretries=3' >> /etc/supervisor/conf.d/ql60.conf
  79. echo 'process_name=qzeroded.x64_60' >> /etc/supervisor/conf.d/ql60.conf
  80.  
  81. mv /home/qlds/27960/baseq3/mappool_ca.txt /home/qlds/27960/baseq3/mappool_ca.txt.bak
  82.  
  83. echo 'asylum|ca' >> /home/qlds/27960/baseq3/mappool_ca.txt
  84. echo 'campgrounds|ca' >> /home/qlds/27960/baseq3/mappool_ca.txt
  85. echo 'overkill|ca' >> /home/qlds/27960/baseq3/mappool_ca.txt
  86. echo 'quarantine|ca' >> /home/qlds/27960/baseq3/mappool_ca.txt
  87. echo 'trinity|ca' >> /home/qlds/27960/baseq3/mappool_ca.txt
  88.  
  89. #Rename the original QuakeLive server.cfg to server.cfg.bak
  90. mv /home/qlds/27960/baseq3/server.cfg /home/qlds/27960/baseq3/server.cfg.bak
  91.  
  92. #Append basic server.cfg cvars
  93. echo 'set sv_hostname "rcb60"' >> /home/qlds/27960/baseq3/server.cfg
  94. echo 'set sv_tags "rcb"' >> /home/qlds/27960/baseq3/server.cfg
  95. echo 'set sv_mapPoolFile "mappool_ca.txt"' >> /home/qlds/27960/baseq3/server.cfg
  96. echo 'set g_accessFile "access.txt"' >> /home/qlds/27960/baseq3/server.cfg
  97. echo 'set sv_maxClients "24"' >> /home/qlds/27960/baseq3/server.cfg
  98. echo 'set g_password ""' >> /home/qlds/27960/baseq3/server.cfg
  99. echo 'set sv_privateClients ""' >> /home/qlds/27960/baseq3/server.cfg
  100. echo 'set sv_privatePassword ""' >> /home/qlds/27960/baseq3/server.cfg
  101. echo 'set com_hunkMegs "256"' >> /home/qlds/27960/baseq3/server.cfg
  102. echo 'set com_zoneMegs "512"' >> /home/qlds/27960/baseq3/server.cfg
  103. echo 'set sv_floodprotect "0"' >> /home/qlds/27960/baseq3/server.cfg
  104. echo 'set g_floodprot_maxcount "10"' >> /home/qlds/27960/baseq3/server.cfg
  105. echo 'set g_floodprot_decay "1000"' >> /home/qlds/27960/baseq3/server.cfg
  106. echo 'set g_voteFlags "0"' >> /home/qlds/27960/baseq3/server.cfg
  107. echo 'set g_allowVote "1"' >> /home/qlds/27960/baseq3/server.cfg
  108. echo 'set g_voteDelay "1"' >> /home/qlds/27960/baseq3/server.cfg
  109. echo 'set g_voteLimit "0"' >> /home/qlds/27960/baseq3/server.cfg
  110. echo 'set g_allowVoteMidGame "1"' >> /home/qlds/27960/baseq3/server.cfg
  111. echo 'set g_allowSpecVote "0"' >> /home/qlds/27960/baseq3/server.cfg
  112. echo 'set sv_warmupReadyPercentage "0.51"' >> /home/qlds/27960/baseq3/server.cfg
  113. echo 'set g_warmupDelay "5"' >> /home/qlds/27960/baseq3/server.cfg
  114. echo 'set g_warmupReadyDelay "0"' >> /home/qlds/27960/baseq3/server.cfg
  115. echo 'set g_warmupReadyDelayAction "1"' >> /home/qlds/27960/baseq3/server.cfg
  116. echo 'set g_inactivity "0"' >> /home/qlds/27960/baseq3/server.cfg
  117. echo 'set g_alltalk "1"' >> /home/qlds/27960/baseq3/server.cfg

This paste is large and only partially shown.
View full paste

View raw paste Reply