Some changes on script output.

This commit is contained in:
Christoph 2017-09-27 17:16:17 +02:00
parent 7a89140a10
commit ca546aacc5

View File

@ -53,7 +53,7 @@ warn (){
info (){ info (){
if $terminal ; then if $terminal ; then
echo "" echo ""
echo -e "\t[ \033[32m\033[1mInfo\033[m ]: $*" echo -e " [ \033[32m\033[1mInfo\033[m ]: $*"
echo "" echo ""
fi fi
} }
@ -115,10 +115,18 @@ if [[ ${#revoked_serial_arr[@]} -gt 0 ]]; then
fi fi
done done
else else
info "No revoked OpenVPN keys exists" info "No revoked OpenVPN keys in \033[1m${KEY_DIR}\033[m exists"
fi fi
echo echo
if [[ ${#revoked_cn_arr[@]} -gt 0 ]]; then
echo ""
if $terminal ; then
echo -e "Revoked Keys in \033[32m\033[1m${KEY_DIR}\033[m:"
else
echo "Revoked Keys in ${KEY_DIR}:"
fi
echo ""
for _val in ${revoked_cn_arr[@]} ; do for _val in ${revoked_cn_arr[@]} ; do
IFS=':' read -a _val_arr <<< "${_val}" IFS=':' read -a _val_arr <<< "${_val}"
if $terminal ; then if $terminal ; then
@ -127,6 +135,7 @@ for _val in ${revoked_cn_arr[@]} ; do
echo " Serial: ${_val_arr[0]} CN: ${_val_arr[1]}" echo " Serial: ${_val_arr[0]} CN: ${_val_arr[1]}"
fi fi
done done
fi
echo echo
exit exit