Skip to content

Commit

Permalink
Release 1.79
Browse files Browse the repository at this point in the history
### Fixed
 - [LET'S ENCRYPT][RENEW CRONTAB] : Reload modified tls profiles according to renewed certificates (1.771 - issue with let's Encrypt renewal #17)
  • Loading branch information
KGuillemot authored Aug 6, 2021
2 parents 5d73c4c + 687022e commit 7b4d619
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
11 changes: 11 additions & 0 deletions crontab/vlt-gui/acme-renew.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
logger = logging.getLogger('cluster')

from gui.models.ssl_certificate import SSLCertificate
from gui.models.mod_ssl import ModSSL
from gui.models.system_settings import Cluster
from M2Crypto import X509
from redis import Redis
Expand Down Expand Up @@ -65,6 +66,7 @@
else:
logger.info("Let's encrypt certificates renewed : {}".format(success))

updated_modssl = set()
for cert in SSLCertificate.objects(issuer="LET'S ENCRYPT", status__ne="R"):

if is_master:
Expand Down Expand Up @@ -121,6 +123,15 @@
print("Updating certificate {}".format(cert.name))
cert.write_certificate()

for ssl_profile in ModSSL.objects.filter(certificate=cert):
updated_modssl.update(ssl_profile)


for modssl in updated_modssl:
print("Reloading ssl profile '{}' certificates".format(modssl))
modssl.writeConf()


""" Let's reload Apache's processes """
subprocess.Popen(['/usr/local/bin/sudo', '-u', 'vlt-sys', '/usr/local/bin/sudo', 'service', 'vulture', 'reload'])

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh
#
# This migration script install newest Vulture-LIBS package
#
#

. /etc/rc.conf

if [ "$http_proxy" != "" ]
then
export https_proxy="http://$http_proxy"
export http_proxy="http://$http_proxy"
fi

cd /tmp

/bin/echo "[+] Updating Vulture-LIBS from branch \"$1\"..."
/bin/rm -f /tmp/Vulture-LIBS.tar.gz

bsd_version=$(/usr/bin/uname -r | /usr/bin/cut -d '-' -f 1)
url="https://download.vultureproject.org/v3/$bsd_version$1/Vulture-LIBS.tar.gz"

/bin/echo -n "[+] Downloading from '$url' ..."
/usr/local/bin/wget --no-check-certificate $url >>/tmp/installation.log 2>&1
/bin/echo "DONE"

cd /home/vlt-gui
/bin/rm -rf ./env
/usr/bin/tar xf /tmp/Vulture-LIBS.tar.gz
/usr/sbin/chown -R vlt-gui:vlt-gui /home/vlt-gui/

/bin/echo -n "[+] Installing Vulture libraries ..."
/bin/sh "/home/vlt-gui/lib-$bsd_version/install.sh"
/bin/echo "OK"

/bin/echo "[*] Update of Vulture-LIBS ended"

0 comments on commit 7b4d619

Please sign in to comment.