From 334103a15087ad3fe0f4483bd2fbfeb52639787d Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 22 Jun 2017 16:31:27 +0200 Subject: [PATCH] library/roles/orientdb: delay the start after the stop in the letsencrypt hook. See https://support.d4science.org/issues/8992 --- orientdb/tasks/main.yml | 2 +- orientdb/templates/orientdb-letsencrypt-acme.sh.j2 | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/orientdb/tasks/main.yml b/orientdb/tasks/main.yml index 1300e098..ef8c370f 100644 --- a/orientdb/tasks/main.yml +++ b/orientdb/tasks/main.yml @@ -77,7 +77,7 @@ - name: Install a letsencrypt hook to update the orientdb certificate template: src=orientdb-letsencrypt-acme.sh.j2 dest={{ letsencrypt_acme_services_scripts_dir }}/orientdb owner=root group=root mode=4555 - tags: [ 'orientdb', 'letsencrypt' ] + tags: [ 'orientdb', 'letsencrypt', 'orientdb_letsencrypt' ] when: - orientdb_install - orientdb_letsencrypt_ssl_enabled diff --git a/orientdb/templates/orientdb-letsencrypt-acme.sh.j2 b/orientdb/templates/orientdb-letsencrypt-acme.sh.j2 index c491ca12..2ae35ee4 100644 --- a/orientdb/templates/orientdb-letsencrypt-acme.sh.j2 +++ b/orientdb/templates/orientdb-letsencrypt-acme.sh.j2 @@ -26,8 +26,11 @@ fi chmod 440 {{ java_keyring_file }} chgrp {{ orientdb_user }} {{ java_keyring_file }} +logger "orientdb letsencrypt hook: shut down orientdb." /etc/init.d/orientdb stop +sleep 30 /etc/init.d/orientdb start +logger "orientdb letsencrypt hook: start orientdb." logger "orientdb letsencrypt hook: the keystore has been updated with the renewed certificate." exit 0