cert.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/bash
  2. red='\e[1;31m'
  3. green='\e[0;32m'
  4. NC='\e[0m'
  5. MYIP=$(wget -qO- icanhazip.com);
  6. echo "Checking VPS"
  7. clear
  8. echo start
  9. sleep 0.5
  10. source /var/lib/premium-script/ipvps.conf
  11. domain="$(cat /etc/v2ray/domain)"
  12. sudo lsof -t -i tcp:80 -s tcp:listen | sudo xargs kill
  13. cd /root/
  14. wget -O acme.sh https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh
  15. bash acme.sh --install
  16. rm acme.sh
  17. cd .acme.sh
  18. bash acme.sh --register-account -m irwan@aidan.my
  19. bash acme.sh --issue --standalone -d $domain -k ec-256
  20. bash acme.sh --installcert -d $domain --fullchainpath /etc/v2ray/v2ray.crt --keypath /etc/v2ray/v2ray.key
  21. /etc/init.d/ssh restart
  22. /etc/init.d/dropbear restart
  23. /etc/init.d/stunnel4 restart
  24. /etc/init.d/openvpn restart
  25. /etc/init.d/fail2ban restart
  26. /etc/init.d/cron restart
  27. /etc/init.d/nginx restart
  28. /etc/init.d/squid restart
  29. screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7100 --max-clients 1000
  30. screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7200 --max-clients 1000
  31. screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7300 --max-clients 1000
  32. systemctl restart v2ray@none
  33. systemctl restart v2ray
  34. systemctl restart trojan
  35. systemctl restart v2ray@vless
  36. systemctl restart v2ray@vnone
  37. echo -e ""
  38. echo -e "======================================"
  39. echo -e ""
  40. echo -e " Service/s Restarted "
  41. echo -e ""
  42. echo -e "======================================"
  43. exit
  44. clear
  45. neofetch