frps_linux_uninstall.sh 790 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env bash
  2. PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
  3. export PATH
  4. # fonts color
  5. Green="\033[32m"
  6. Red="\033[31m"
  7. Yellow="\033[33m"
  8. GreenBG="\033[42;37m"
  9. RedBG="\033[41;37m"
  10. Font="\033[0m"
  11. # fonts color
  12. # variable
  13. WORK_PATH=$(dirname $(readlink -f $0))
  14. FRP_NAME=frps
  15. FRP_VERSION=0.51.3
  16. FRP_PATH=/usr/local/frp
  17. # 停止frpc
  18. sudo systemctl stop ${FRP_NAME}
  19. sudo systemctl disable ${FRP_NAME}
  20. # 删除frpc
  21. rm -rf ${FRP_PATH}
  22. # 删除frpc.service
  23. rm -rf /lib/systemd/system/${FRP_NAME}.service
  24. sudo systemctl daemon-reload
  25. # 删除本文件
  26. rm -rf ${FRP_NAME}_linux_uninstall.sh
  27. echo -e "${Green}============================${Font}"
  28. echo -e "${Green}卸载成功,相关文件已清理完毕!${Font}"
  29. echo -e "${Green}============================${Font}"