Skip to content

Commit 27bab9e

Browse files
committed
Add check for email Ubuntu 18.04 + Hide warning
1 parent 9bcb2cd commit 27bab9e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/v-generate-ssl-cert

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ args_usage='DOMAIN EMAIL COUNTRY STATE CITY ORG UNIT [ALIASES] [FORMAT]'
7474
check_args '7' "$#" "$args_usage"
7575
is_format_valid 'domain' 'aliases' 'format'
7676

77+
release="$(lsb_release -s -r)"
78+
if [ "$release" = "18.04" ]; then
79+
is_format_valid 'email'
80+
fi
7781

7882
if [ ! -f /root/.rnd ]; then
7983
touch /root/.rnd
@@ -108,7 +112,7 @@ if [ -z "$aliases" ]; then
108112
-batch \
109113
-subj "$subj" \
110114
-key $domain.key \
111-
-out $domain.csr #>/dev/null 2>&1
115+
-out $domain.csr >/dev/null 2>&1
112116
else
113117
for alias in $(echo $domain,$aliases |tr ',' '\n' |sort -u); do
114118
if [[ "$alias" = *[![:ascii:]]* ]]; then

0 commit comments

Comments
 (0)