install_commercial.sh 903 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. F="proxy-linux-amd64_commercial.tar.gz"
  3. manual="https://snail007.host900.com/goproxy/manual/"
  4. set -e
  5. WORKDIR="/tmp/proxy"
  6. rm -rf $WORKDIR
  7. mkdir $WORKDIR
  8. cp $F $WORKDIR
  9. cd /tmp/proxy
  10. echo -e ">>> installing ... \n"
  11. tar zxvf $F >/dev/null 2>&1
  12. set +e
  13. killall -9 proxy >/dev/null 2>&1
  14. set -e
  15. cp -f proxy /usr/bin/
  16. chmod +x /usr/bin/proxy
  17. if [ ! -e /etc/proxy ]; then
  18. mkdir /etc/proxy
  19. cp blocked /etc/proxy
  20. cp direct /etc/proxy
  21. fi
  22. if [ ! -e /etc/proxy/proxy.crt ]; then
  23. cd /etc/proxy/
  24. proxy keygen -C proxy >/dev/null 2>&1
  25. fi
  26. rm -rf /tmp/proxy
  27. version=`proxy --version 2>&1`
  28. echo -e ">>> install done, thanks for using snail007/goproxy $version\n"
  29. echo -e ">>> install path /usr/bin/proxy\n"
  30. echo -e ">>> configuration path /etc/proxy\n"
  31. echo -e ">>> uninstall just exec : rm /usr/bin/proxy && rm -rf /etc/proxy\n"
  32. echo -e ">>> How to using? Please visit : $manual\n"