Commit 489460f0 authored by Paul Cammish's avatar Paul Cammish
Browse files

Fixed race condition bug

parent 6742f102
......@@ -12,7 +12,7 @@ if [ ! -L /srv/*/config/ssl/current ]; then
cd /etc/dovecot
sudo /usr/bin/make test
sudo /usr/bin/make > /dev/null
sudo /usr/sbin/service dovecot reload
sudo /usr/sbin/service dovecot reload > /dev/null 2>&1 | true
fi
exit 0
else
......@@ -50,7 +50,7 @@ done >> /dev/shm/sympl-mail-dovecot-sni.config
# Compare it with what's there already.
if [ -f "/etc/dovecot/sympl.d/10-main/60-sni" ]; then
if diff /dev/shm/sympl-mail-dovecot-sni.config /etc/dovecot/sympl.d/10-main/60-sni > /dev/null ; then
# Config has not changed, exiting.
# Config hasnt changed, so just exit.
exit 0
fi
fi
......@@ -63,7 +63,7 @@ if [ -f /etc/dovecot/Makefile ]; then
cd /etc/dovecot
sudo /usr/bin/make test
sudo /usr/bin/make > /dev/null
sudo /usr/sbin/service dovecot reload
sudo /usr/sbin/service dovecot reload > /dev/null 2>&1 | true
fi
if [ -f /dev/shm/sympl-mail-dovecot-sni.data ]; then rm /dev/shm/sympl-mail-dovecot-sni.data; fi
......
#!/bin/bash -eu
#!/bin/bash
if ! [ "$1" = "live-update" ] ; then
echo "I: $0: Ignoring unknown hook action $1"
if ! [ "x$1" = "xlive-update" ] ; then
echo "I: $0: Ignoring unknown hook action '$1'"
exit 0
fi
#
# Rebuild Dovecot SNI Certificates and reload on cert change.
# Rebuild Dovecot SNI Certificates and reload config.
#
/usr/sbin/sympl-mail-dovecot-sni
/usr/sbin/service dovecot reload
\ No newline at end of file
/usr/sbin/service dovecot reload > /dev/null 2>&1 | true
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment