From 5c26782925e981012c763208de31a9a58b0193cc Mon Sep 17 00:00:00 2001 From: Ludwig Lautenbacher Date: Thu, 10 Sep 2020 14:55:35 +0200 Subject: [PATCH] Showing expired certificates as such. --- scripts/openvpn/listOVPN.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/openvpn/listOVPN.sh b/scripts/openvpn/listOVPN.sh index c87ecfd..55826c6 100755 --- a/scripts/openvpn/listOVPN.sh +++ b/scripts/openvpn/listOVPN.sh @@ -8,6 +8,8 @@ if [ ! -f "${INDEX}" ]; then exit 1 fi +/etc/openvpn/easy-rsa/easyrsa update-db >> /var/log/easyrsa_update-db.log 2>1 + printf ": NOTE : The first entry should always be your valid server!\n" printf "\\n" printf "\\e[1m::: Certificate Status List :::\\e[0m\\n" @@ -23,6 +25,8 @@ while read -r line || [ -n "$line" ]; do printf "Valid \t %s \t %s\\n" "$NAME" "$EXPD" elif [ "${STATUS}" == "R" ]; then printf "Revoked \t %s \t %s\\n" "$NAME" "$EXPD" + elif [ "${STATUS}" == "E" ]; then + printf " Expired :: %s\n" "$NAME" else printf "Unknown \t %s \t %s\\n" "$NAME" "$EXPD" fi