mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-19 17:01:37 +02:00
Makes a single systcmtl call in pre- and post-renewal hooks
This commit is contained in:
parent
2da7a3f2b6
commit
878c8e2664
@ -1,11 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
|
{% if ansible_service_mgr == 'systemd' %}
|
||||||
|
systemctl start {{ certbot_create_standalone_stop_services | join(" ") }}
|
||||||
|
{% else %}
|
||||||
{% for item in certbot_create_standalone_stop_services %}
|
{% for item in certbot_create_standalone_stop_services %}
|
||||||
echo "starting service {{ item }}"
|
echo "starting service {{ item }}"
|
||||||
{% if ansible_service_mgr == 'systemd' %}
|
{% if ansible_service_mgr == 'upstart' %}
|
||||||
systemctl start {{ item }}
|
|
||||||
{% elif ansible_service_mgr == 'upstart' %}
|
|
||||||
initctl start {{ item }}
|
initctl start {{ item }}
|
||||||
{% elif ansible_service_mgr == 'openrc' %}
|
{% elif ansible_service_mgr == 'openrc' %}
|
||||||
rc-service {{ item }} start
|
rc-service {{ item }} start
|
||||||
@ -13,3 +14,4 @@ rc-service {{ item }} start
|
|||||||
service {{ item }} start
|
service {{ item }} start
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
|
{% if ansible_service_mgr == 'systemd' %}
|
||||||
|
systemctl stop {{ certbot_create_standalone_stop_services | join(" ") }}
|
||||||
|
{% else %}
|
||||||
{% for item in certbot_create_standalone_stop_services %}
|
{% for item in certbot_create_standalone_stop_services %}
|
||||||
echo "stopping service {{ item }}"
|
echo "stopping service {{ item }}"
|
||||||
{% if ansible_service_mgr == 'systemd' %}
|
{% if ansible_service_mgr == 'upstart' %}
|
||||||
systemctl stop {{ item }}
|
|
||||||
{% elif ansible_service_mgr == 'upstart' %}
|
|
||||||
initctl stop {{ item }}
|
initctl stop {{ item }}
|
||||||
{% elif ansible_service_mgr == 'openrc' %}
|
{% elif ansible_service_mgr == 'openrc' %}
|
||||||
rc-service {{ item }} stop
|
rc-service {{ item }} stop
|
||||||
@ -13,3 +14,4 @@ rc-service {{ item }} stop
|
|||||||
service {{ item }} stop
|
service {{ item }} stop
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user