mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
Merge pull request #1139 from LLautenbacher/feature/show_expired_cert
Showing expired certificates as such.
This commit is contained in:
commit
77e75829ea
1 changed files with 10 additions and 0 deletions
|
@ -8,6 +8,14 @@ if [ ! -f "${INDEX}" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
EASYRSA="/etc/openvpn/easy-rsa/easyrsa"
|
||||||
|
if [ ! -f "${EASYRSA}" ]; then
|
||||||
|
echo "The file: $EASYRSA was not found!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
$EASYRSA update-db >> /dev/null 2>1
|
||||||
|
|
||||||
printf ": NOTE : The first entry should always be your valid server!\n"
|
printf ": NOTE : The first entry should always be your valid server!\n"
|
||||||
printf "\\n"
|
printf "\\n"
|
||||||
printf "\\e[1m::: Certificate Status List :::\\e[0m\\n"
|
printf "\\e[1m::: Certificate Status List :::\\e[0m\\n"
|
||||||
|
@ -23,6 +31,8 @@ while read -r line || [ -n "$line" ]; do
|
||||||
printf "Valid \t %s \t %s\\n" "$NAME" "$EXPD"
|
printf "Valid \t %s \t %s\\n" "$NAME" "$EXPD"
|
||||||
elif [ "${STATUS}" == "R" ]; then
|
elif [ "${STATUS}" == "R" ]; then
|
||||||
printf "Revoked \t %s \t %s\\n" "$NAME" "$EXPD"
|
printf "Revoked \t %s \t %s\\n" "$NAME" "$EXPD"
|
||||||
|
elif [ "${STATUS}" == "E" ]; then
|
||||||
|
printf "Expired \t %s \t %s\\n" "$NAME" "$EXPD"
|
||||||
else
|
else
|
||||||
printf "Unknown \t %s \t %s\\n" "$NAME" "$EXPD"
|
printf "Unknown \t %s \t %s\\n" "$NAME" "$EXPD"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue