Skip to content
Snippets Groups Projects
Commit a2aef5e0 authored by root's avatar root
Browse files

set default value for CN and DN

parent 57da5f13
Branches interactive
No related tags found
No related merge requests found
......@@ -28,13 +28,17 @@ else
echo "CN - Common Name of the user, for user certificate"
echo "Email will be generated automatically in Username@Domain format becouse of format restrictions in some services"
sleep 10
for i in firstname lastname username DN CN; do
for i in firstname lastname username; do
read -p "${i}: " $i
if [ -z $i ]; then
echo "Error: Empty string for ${i}! exiting..."
exit 1
fi
done
read -p "Enter DN for Certificate [${firstname}${lastname}]: " DN
DN=${DN:-${firstname}${lastname}}
read -p "Enter CN for Certificate [${firstname}${lastname}]: " CN
CN=${CN:-${firstname}${lastname}}
echo
echo
echo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment