cek-pptp.sh 611 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. red='\e[1;31m'
  3. green='\e[0;32m'
  4. NC='\e[0m'
  5. MYIP=$(wget -qO- https://icanhazip.com);
  6. echo "Checking VPS"
  7. clear
  8. last | grep ppp | grep still | awk '{print " ",$1," - " $3 }' > /tmp/login-db-pptp.txt;
  9. echo " "
  10. echo " "
  11. echo "===========================================";
  12. echo " "
  13. echo " "
  14. echo "-------------------------------------";
  15. echo " PPTP VPN User Login";
  16. echo "-------------------------------------";
  17. echo "Username --- IP";
  18. echo "-------------------------------------";
  19. cat /tmp/login-db-pptp.txt
  20. echo " "
  21. echo " "
  22. echo " "
  23. echo "===========================================";
  24. echo " ";