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 }}
|
||||
|
||||
{% if ansible_service_mgr == 'systemd' %}
|
||||
systemctl start {{ certbot_create_standalone_stop_services | join(" ") }}
|
||||
{% else %}
|
||||
{% for item in certbot_create_standalone_stop_services %}
|
||||
echo "starting service {{ item }}"
|
||||
{% if ansible_service_mgr == 'systemd' %}
|
||||
systemctl start {{ item }}
|
||||
{% elif ansible_service_mgr == 'upstart' %}
|
||||
{% if ansible_service_mgr == 'upstart' %}
|
||||
initctl start {{ item }}
|
||||
{% elif ansible_service_mgr == 'openrc' %}
|
||||
rc-service {{ item }} start
|
||||
@ -13,3 +14,4 @@ rc-service {{ item }} start
|
||||
service {{ item }} start
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
@ -1,11 +1,12 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
# {{ ansible_managed }}
|
||||
|
||||
{% if ansible_service_mgr == 'systemd' %}
|
||||
systemctl stop {{ certbot_create_standalone_stop_services | join(" ") }}
|
||||
{% else %}
|
||||
{% for item in certbot_create_standalone_stop_services %}
|
||||
echo "stopping service {{ item }}"
|
||||
{% if ansible_service_mgr == 'systemd' %}
|
||||
systemctl stop {{ item }}
|
||||
{% elif ansible_service_mgr == 'upstart' %}
|
||||
{% if ansible_service_mgr == 'upstart' %}
|
||||
initctl stop {{ item }}
|
||||
{% elif ansible_service_mgr == 'openrc' %}
|
||||
rc-service {{ item }} stop
|
||||
@ -13,3 +14,4 @@ rc-service {{ item }} stop
|
||||
service {{ item }} stop
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user