MaX33333

tModLoader Ubuntu 20.04 deploy script

Jan 6th, 2022 (edited)
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.61 KB | None | 0 0
  1. #!/bin/bash
  2. ## tModLoader deploy script
  3. ## Ports: tcp 7777
  4. ## Expects: nothing
  5. set -x
  6.  
  7. TMODLOADERVER=0.11.8.5
  8. TERRARIA_VERSION=1353
  9.  
  10. cat > ~/.tmux.conf << 'EOF'
  11. set -g history-limit 50000
  12. set -g default-terminal "screen-256color"
  13. set-option -g default-shell "/bin/bash"
  14. set -g base-index 1
  15. setw -g pane-base-index 1
  16. EOF
  17.  
  18. dd if=/dev/zero of=/swapfile bs=1024 count=1048576
  19. chmod 600 /swapfile
  20. mkswap /swapfile
  21. swapon /swapfile
  22. swapon --show
  23.  
  24. cd
  25. mkdir btop
  26. cd btop
  27. wget https://github.com/aristocratos/btop/releases/download/v1.1.4/btop-x86_64-linux-musl.tbz
  28. tar -xf btop-x86_64-linux-musl.tbz
  29. ./install.sh
  30. ./setuid.sh
  31.  
  32. apt update
  33. apt install -y unzip gnupg ca-certificates
  34. apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
  35. mkdir -p /etc/apt/sources.list.d/
  36. touch /etc/apt/sources.list.d/mono-official-stable.list
  37. echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | tee /etc/apt/sources.list.d/mono-official-stable.list
  38. apt update
  39. apt install -y mono-devel
  40.  
  41. cd
  42. mkdir terra
  43. cd terra
  44. wget "https://web.archive.org/web/20190630145553if_/http://terraria.org/server/terraria-server-${TERRARIA_VERSION}.zip"
  45. unzip "terraria-server-${TERRARIA_VERSION}.zip"
  46. rm "terraria-server-${TERRARIA_VERSION}.zip"
  47. cp --verbose -a "${TERRARIA_VERSION}/Linux/." .
  48. rm -r "${TERRARIA_VERSION}"
  49. wget "https://github.com/tModLoader/tModLoader/releases/download/v$TMODLOADERVER/tModLoader.Linux.v$TMODLOADERVER.tar.gz"
  50. tar -xf "tModLoader.Linux.v$TMODLOADERVER.tar.gz"
  51. rm "tModLoader.Linux.v$TMODLOADERVER.tar.gz"
  52. chmod u+x tModLoaderServer*
  53.  
Add Comment
Please, Sign In to add comment