#! /bin/sh set -e certroot=$(cd ${0%/*}/..; pwd) cd "$certroot" . lib/func.sh runas_ca now=$(date +%Y-%m-%d) n=0 while t=$now#$n.crl; [ -f crls/$t ]; do n=$(expr $n + 1) done openssl ca -config openssl.conf -gencrl -out crls/$t rm -f crls/new ln -s $t crls/new mv crls/new crls/current