runner.sh 1.5 KB

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. #sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources
  3. apt update -y
  4. apt install curl gnupg2 ca-certificates gzip xz-utils iproute2 unzip net-tools procps wget --no-install-recommends -y
  5. Ver=$(wget -qO- -t1 -T2 https://api.github.com/repos/just-containers/s6-overlay/releases/latest | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')
  6. wget https://github.com/just-containers/s6-overlay/releases/download/$Ver/s6-overlay-noarch.tar.xz
  7. #curl -L -O https://github.com/just-containers/s6-overlay/releases/download/$Ver/s6-overlay-noarch.tar.xz
  8. #curl -L -O https://github.com/just-containers/s6-overlay/releases/download/v3.1.6.2/s6-overlay-noarch.tar.xz
  9. tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz && rm /tmp/s6-overlay-noarch.tar.xz
  10. wget https://github.com/just-containers/s6-overlay/releases/download/$Ver/s6-overlay-$(uname -m).tar.xz
  11. #curl -L -O https://github.com/just-containers/s6-overlay/releases/download/$Ver/s6-overlay-$(uname -m).tar.xz
  12. #curl -L -O https://github.com/just-containers/s6-overlay/releases/download/v3.1.6.2/s6-overlay-$(uname -m).tar.xz
  13. tar -C / -Jxpf /tmp/s6-overlay-$(uname -m).tar.xz && rm /tmp/s6-overlay-$(uname -m).tar.xz
  14. groupadd -g 2222 zerotier-one
  15. useradd -u 2222 -g 2222 zerotier-one
  16. usermod -aG zerotier-one zerotier-one
  17. usermod -aG zerotier-one root
  18. curl -sL -o zt-one.sh https://install.zerotier.com
  19. bash zt-one.sh
  20. rm -f zt-one.sh
  21. apt clean -y
  22. rm -rf /var/lib/zerotier-one
  23. rm -rf /var/lib/apt/lists/*
粤ICP备19079148号