Update listOVPN.sh

This commit allows PiVPN scripts to display certificates with common names like "José" better. Prior to this commit, names like "José" would be shown as "Jos\xC3\xA9".
This commit is contained in:
Douglas Orend 2020-10-20 10:57:28 -05:00 committed by GitHub
parent 63733b44a5
commit 5d2761b94b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,13 +28,13 @@ while read -r line || [ -n "$line" ]; do
EXPD=$(echo "$line" | awk '{if (length($2) == 15) print $2; else print "20"$2}' | cut -b 1-8 | date +"%b %d %Y" -f -)
if [ "${STATUS}" == "V" ]; then
printf "Valid \t %s \t %s\\n" "$NAME" "$EXPD"
printf "Valid \t %s \t %s\\n" "$(echo -e "$NAME")" "$EXPD"
elif [ "${STATUS}" == "R" ]; then
printf "Revoked \t %s \t %s\\n" "$NAME" "$EXPD"
printf "Revoked \t %s \t %s\\n" "$(echo -e "$NAME")" "$EXPD"
elif [ "${STATUS}" == "E" ]; then
printf "Expired \t %s \t %s\\n" "$NAME" "$EXPD"
printf "Expired \t %s \t %s\\n" "$(echo -e "$NAME")" "$EXPD"
else
printf "Unknown \t %s \t %s\\n" "$NAME" "$EXPD"
printf "Unknown \t %s \t %s\\n" "$(echo -e "$NAME")" "$EXPD"
fi
done <${INDEX}