10 echo "${ME} - Create VPN Configs"
15 echo -e " ${RED}-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-${NC}"
16 echo -e " ${RED}L O O K A T W H A T T O D O${NC}"
17 echo -e " ${RED}-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-${NC}"
19 echo "Assuming no failures were output above, here's what you should have:"
20 echo " VPNConfigs/${1}-${2}.ovpn"
22 echo "For Windows users, you should rename this to ${1}.ovpn and put it into the configurations directory"
23 echo "as described on the confluence page."
25 echo "For Mac users (running tunnelblick) you should create a directory named ${1}.tblk and put"
26 echo "VPNConfigs/${1}-${2}.ovpn into it. Once you have that on your Mac, you should just be able"
27 echo "to double click on it."
36 ${ME} environment user
38 ${ME} userStage test.user@samsung.com
40 Currently defined environments:
42 for i
in $(ls -d1 *${DIR_SUFFIX})
44 echo " - ${i%${DIR_SUFFIX}}"
50 local environment
="$1"
53 userManagementTemplates
/"${environment}".sh
"${environment}" "${user}" > "VPNConfigs/${environment}-${user}.ovpn"
56 if [ -z $2 ] || [ "$1" == "-h" ] ; then
59 if [ ! -d "${1}${DIR_SUFFIX}" ] || [ ! -e "userManagementTemplates/${1}.sh" ] ; then
60 echo "Invalid configuration profile: ${1}"
65 if [ -e ${1}${DIR_SUFFIX}/pki
/issued
/${2}.crt
]; then
66 echo "${2} already has a certificate..."
68 genConfiguration
"${1}" "${2}"
70 echo "Well, you didn't ask for help, and you provided a valid profile, and the user doesn't already exist..."
72 echo -e "${RED}**************************************************************************${NC}"
73 echo -e "${RED}*** ***${NC}"
74 echo -e "${RED}*** ${NC}The next step will ask you for a password, this is the CA password ${RED}***${NC}"
75 echo -e "${RED}*** ***${NC}"
76 echo -e "${RED}**************************************************************************${NC}"
78 pushd "${1}${DIR_SUFFIX}" >/dev
/null
79 .
/easyrsa build
-client-full "${2}" nopass
81 genConfiguration
"${1}" "${2}"