From 2d0c9d80dde1ccc7f99deb0720db5ad0d252c568 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 29 May 2013 14:45:14 +0200 Subject: [PATCH] Use different name for the crl to prevent race conditions with openvpn-bridge --- .../events/actions/openvpn-routed-update-crl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/root/etc/e-smith/events/actions/openvpn-routed-update-crl b/root/etc/e-smith/events/actions/openvpn-routed-update-crl index bdda81d..19a1e89 100644 --- a/root/etc/e-smith/events/actions/openvpn-routed-update-crl +++ b/root/etc/e-smith/events/actions/openvpn-routed-update-crl @@ -7,14 +7,14 @@ if [ -z $URL ]; then exit 0 fi -/usr/bin/wget $URL -O /tmp/cacrl.pem > /dev/null 2>&1 +/usr/bin/wget $URL -O /tmp/cacrl_routed.pem > /dev/null 2>&1 -/usr/bin/openssl crl -inform PEM -in /tmp/cacrl.pem -text > /dev/null 2>&1 +/usr/bin/openssl crl -inform PEM -in /tmp/cacrl_routed.pem -text > /dev/null 2>&1 if [ "$?" -eq "0" ]; then - /bin/mv -f /tmp/cacrl.pem /etc/openvpn/routed/pub/cacrl.pem > /dev/null 2>&1 + /bin/mv -f /tmp/cacrl_routed.pem /etc/openvpn/routed/pub/cacrl.pem > /dev/null 2>&1 else - cat > /tmp/crlmail < /tmp/crlmail_routed <> /tmp/crlmail - mail -s 'CRL update failed' admin@$DOMAIN < /tmp/crlmail + cat /tmp/cacrl_routed.pem >> /tmp/crlmail_routed + mail -s 'CRL update failed' admin@$DOMAIN < /tmp/crlmail_routed fi -rm -f /tmp/cacrl.pem -rm -f /tmp/crlmail +rm -f /tmp/cacrl_routed.pem +rm -f /tmp/crlmail_routed