mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-16 10:13:26 +02:00
13 lines
566 B
Django/Jinja
13 lines
566 B
Django/Jinja
#!/bin/bash -e
|
|
|
|
{% if graylog_letsencrypt_cert is defined %}
|
|
if [ $1 == "{{ graylog_letsencrypt_cert }}" ]; then
|
|
cat /var/lib/dehydrated/certificates/certs/{{ graylog_letsencrypt_cert }}/privkey.pem > {{ graylog_root_dir }}/ssl/key.pem
|
|
cat /var/lib/dehydrated/certificates/certs/{{ graylog_letsencrypt_cert }}/fullchain.pem > {{ graylog_root_dir }}/ssl/cert.pem
|
|
chown root:graylog {{ graylog_root_dir }}/ssl/*
|
|
chmod 644 {{ graylog_root_dir }}/ssl/cert.pem
|
|
chmod 640 {{ graylog_root_dir }}/ssl/key.pem
|
|
/bin/systemctl restart graylog-server
|
|
fi
|
|
{% endif %}
|