diff --git a/openvpn-install.sh b/openvpn-install.sh index ef50936..7a2fbe4 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -1302,7 +1302,7 @@ printf '\n' while read -r line || [ -n "$line" ]; do STATUS=$(echo "$line" | awk '{print $1}') NAME=$(echo "$line" | cut -d '=' -f2) - EXPD=$(echo "$line" | awk '{if (length($2) == 15) print $2; else print "20"$2}' | cut -b 1-8 | date +"%b %d %Y" -f -) + EXPD=$(echo "$line" | awk '{if (length($3) == 13) print "20"$3; 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"