/[smeserver]/rpms/dehydrated/sme9/dehydrated_revoke
ViewVC logotype

Contents of /rpms/dehydrated/sme9/dehydrated_revoke

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Fri Jan 6 23:11:17 2017 UTC (7 years, 9 months ago) by unnilennium
Branch: MAIN
CVS Tags: dehydrated-0_5_0-3_el6_sme, dehydrated-0_4_0_20170205_git1163864-1_el6_sme, dehydrated-0_5_0-2_el6_sme, dehydrated-0_6_2-14_el6_sme, dehydrated-0_6_2-13_el6_sme, dehydrated-0_6_1-11_el6_sme, dehydrated-0_3_0_20160914_gitcaeed7d-4_el6_sme, dehydrated-0_6_1-12_el6_sme, HEAD
Initial import dehydrated for sme9

1 #!/bin/sh
2
3 . /etc/dehydrated/config
4
5 for DOM in $(find $BASEDIR/certs/ -mindepth 1 -maxdepth 1 -type d); do
6 CUR_ID=$(readlink $DOM/cert.pem | perl -pe 's/cert-(\d+)\.pem/$1/')
7 for ID in $(find $DOM/ -type f -name cert\*.csr -exec basename "{}" \; | perl -pe 's/cert-(\d+)\.csr/$1/'); do
8 if [[ "$ID" != "$CUR_ID" ]]; then
9 # Is the cert signed ?
10 if /usr/bin/openssl x509 -in $DOM/cert-"$ID".pem -noout > /dev/null 2>&1; then
11 /usr/bin/dehydrated -r $DOM/cert-"$ID".pem
12 else
13 # Cert not signed, probably a failed challenge
14 rm -f $DOM/cert-"$ID".{pem,csr}
15 fi
16 fi
17 done
18 done

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed