Skip to content

Instantly share code, notes, and snippets.

@vncloudsco
Last active March 21, 2019 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vncloudsco/93159d58574b534b21859b010d2d2bbd to your computer and use it in GitHub Desktop.
Save vncloudsco/93159d58574b534b21859b010d2d2bbd to your computer and use it in GitHub Desktop.
#!/bin/bash
RED='\033[0;41;30m'
STD='\033[0;0;39m'
pause(){
read -p "Press [Enter] key to continue..." fackEnterKey
}
one(){
echo "one() called"
pause
}
two(){
echo "two() called"
pause
}
show_menus() {
clear
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " VPN Docker Menu By MTD "
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "1: Tao Nguoi Dung Moi"
echo "2: List Toan BO Nguoi Dung"
echo "3: Xoa Nguoi Dung"
echo "4: Thoat"
}
read_options(){
local choice
read -p "Enter choice [ 1 - 4]: " choice
case $choice in
1 )
echo "Nhap user"
read USD
docker exec -it ipsec-vpn-server /adduser.sh "$$USD"
;;
2 )
echo "Dang Lay List User"
docker exec -it ipsec-vpn-server /lsusers.sh
read -p "Press enter to continue"
;;
3 )
echo "Nhap User Can Xoa"
read RMUSD
docker exec -it ipsec-vpn-server /rmuser.sh "$RMUSD"
;;
4 ) exit 0;;
*) echo -e "${RED}Error...${STD}" && sleep 2
esac
}
trap '' SIGINT SIGQUIT SIGTSTP
while true
do
show_menus
read_options
read -p "Press enter to continue"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment