Sn0wBaall

vpn

Aug 5th, 2025 (edited)
1,153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.94 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ## COLOURS
  4.  
  5. greenColour="\e[0;32m"
  6. endColour="\033[0m\e[0m"
  7. redColour="\e[0;31m"
  8. blueColour="\e[0;34m"
  9. yellowColour="\e[0;33m"
  10. purpleColour="\e[0;35m"
  11. turquoiseColour="\e[0;36m"
  12. grayColour="\e[0;37m"
  13.  
  14. ## BOLD COLOURS
  15.  
  16. BgreenColour="\e[1;32m"
  17. BendColour="\033[0m\e[0m"
  18. BredColour="\e[1;31m"
  19. BblueColour="\e[1;34m"
  20. ByellowColour="\e[1;33m"
  21. BpurpleColour="\e[1;35m"
  22. BturquoiseColour="\e[1;36m"
  23. BgrayColour="\e[1;37m"
  24.  
  25. if [ $(id -u) != 0 ];then
  26.  
  27.     echo -e "\n${BredColour}[!] Run the script with root privileges!!!${endColour}\n"
  28.   exit 1
  29. fi
  30.  
  31. if [ "$1" == "c" ];then
  32.   openvpn /home/user/Vpn/vpn.ovpn &>/dev/null & disown
  33. elif [ "$1" == "d" ];then
  34.   pkill openvpn
  35. else
  36.   echo -e "\n${BgreenColour}[~]${endColour}${grayColour} Usage:${endColour}"
  37.   echo -e "\t ${BpurpleColour}$0${endColour}${BgreenColour} [c]${endColour}${greenColour}onnect${endColour}${BredColour} [d]${endColour}${redColour}isconnect${endColour}\n"
  38. fi
Advertisement
Add Comment
Please, Sign In to add comment