diff --git a/crontab/vlt-gui/acme-renew.py b/crontab/vlt-gui/acme-renew.py index 06baf2e..7e88f0b 100755 --- a/crontab/vlt-gui/acme-renew.py +++ b/crontab/vlt-gui/acme-renew.py @@ -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 @@ -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: @@ -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']) diff --git a/vulture_toolkit/update_api/update_scripts/GUI-1.79/maj_vulture-LIBS.sh b/vulture_toolkit/update_api/update_scripts/GUI-1.79/maj_vulture-LIBS.sh new file mode 100755 index 0000000..2c2be12 --- /dev/null +++ b/vulture_toolkit/update_api/update_scripts/GUI-1.79/maj_vulture-LIBS.sh @@ -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" +