From b6089f25a72b810e57b9a9647da4e9258457ece9 Mon Sep 17 00:00:00 2001 From: Anders Blomdell Date: Fri, 6 May 2022 12:15:23 +0200 Subject: [PATCH] Do all renewable checking in awk script --- easyrsa3/easyrsa | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 0c43ecf..86e6673 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -2064,26 +2064,27 @@ renewable() { verify_ca_init in_dir="$EASYRSA_PKI" - if [ $# -eq 0 ] ; then - awkscript=' + MATCH=$(echo "$*" | sed -re 's/\s+/|/g') + DATE=$(date --date \ + "+${EASYRSA_CERT_RENEW} days" \ + +"%y%m%d%H%M%S") + { awkscript=$(cat) ; } <