Commit ddf98f07 authored by Matthew Smith's avatar Matthew Smith
Browse files

Fix list cert for servers with space in server name

parent 3c3a53b3
......@@ -144,8 +144,7 @@ y" | \
#
function get_current_certificates () {
echo "Index User <email address>"
grep ^V /var/lib/openvpn-server/openssl/index.txt | awk '{print $3 "/" $5}' | sed "s/[a-Z]*=//g" | awk -F "/" '{print $1 "\t" $6 " <" $7 ">"}'
grep ^V /var/lib/openvpn-server/openssl/index.txt | awk '{print $3 "--/--" $6, $7, $8, $9}' | sed -e "s|--/--[a-Z/ 0-9]*=|/|g" -e 's/[[:space:]]*$//' -e 's/emailAddress=//g' | awk -F "/" 'BEGIN {format = "%-6s %-35s %-45s \n" ; printf format, "Index", "User", "Email Address" ; printf format, "-----", "----", "-------------"}{printf format, $1, $2, $3}'
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment