~sirn/ansible-openbsd

ref: fd86c2c3e980ca893f2c6190efae76c59c0db9ed ansible-openbsd/openbsd-dehydrated/templates/periodic.sh.j2 -rw-r--r-- 530 bytes View raw
fd86c2c3Kridsada Thanabulpong Never fail in dehydrated postcmd 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh -e

{% if dehydrated_lexicon_config %}
doas -n -u _dehydrated \
  env \
    PATH="/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin" \
{% for key, value in dehydrated_lexicon_config.items() %}
    {{key}}="{{value}}" \
{% endfor %}
{% endif %}
  /usr/local/bin/dehydrated \
    --hook /etc/dehydrated/hook.sh \
    --challenge dns-01 \
    --cron
{% if dehydrated_postcmds %}
{% for postcmd in dehydrated_postcmds %}

( # postcmd-{{loop.index}}
  {{postcmd|trim|indent(2)}}
) || true
{% endfor %}
{% endif %}