install.sh 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. case `uname -m` in aarch64|arm64) ARCH="arm64";; x86_64|amd64) ARCH="amd64";; *) ARCH="";; esac
  3. [ -n "$ARCH" ] || exit 1
  4. systemctl stop qBittorrent.service >/dev/null 2>&1
  5. systemctl disable qBittorrent.service >/dev/null 2>&1
  6. systemctl stop qbt.service >/dev/null 2>&1
  7. systemctl disable qbt.service >/dev/null 2>&1
  8. rm -rf /usr/bin/qbittorrent
  9. URL="https://github.com/MoeClub/Note/raw/master/qBittorrent"
  10. wget --no-check-certificate -4 -qO- "${URL}/bin/qbittorrent_${ARCH}_v4.4.2_lt_v2.0.6.tar.xz" |tar -Jxv -C /usr/bin
  11. [ $? -eq 0 ] || exit 1
  12. strip /usr/bin/qbittorrent >/dev/null 2>&1
  13. chmod 777 /usr/bin/qbittorrent
  14. mkdir -p /home/qBittorrent/config
  15. mkdir -p /home/qBittorrent/downloads
  16. wget --no-check-certificate -4 -qO- "${URL}/qBittorrent.conf" >/home/qBittorrent/config/qBittorrent.conf
  17. wget --no-check-certificate -4 -qO- "${URL}/qBittorrent.service" >/etc/systemd/system/qbt.service
  18. systemctl daemon-reload >/dev/null 2>&1
  19. systemctl enable qbt.service >/dev/null 2>&1
  20. systemctl start qbt.service >/dev/null 2>&1
  21. systemctl status qbt.service