Bladeren bron

fix(vhosts/cleanup): check `sites-enabled` dir exists before listing it

Co-authored-by: Tristan Charbonneau <tcharbonneau@oceanet-technology.com>

Fix #278
tags/v0.39.5
Yoda-BZH 4 jaren geleden
bovenliggende
commit
88373e38f5
No account linked to committer's email address
1 gewijzigde bestanden met toevoegingen van 6 en 4 verwijderingen
  1. +6
    -4
      apache/vhosts/cleanup.sls

+ 6
- 4
apache/vhosts/cleanup.sls Bestand weergeven

@@ -21,8 +21,9 @@ include:
{% endfor %}


{% for filename in salt['file.readdir']('/etc/apache2/sites-enabled/') %}
{% if filename not in valid_sites %}
{% if salt['file.directory_exists'](dirpath) %}
{% for filename in salt['file.readdir'](dirpath) %}
{% if filename not in valid_sites %}

a2dissite {{ filename }}:
cmd.run:
@@ -34,8 +35,9 @@ a2dissite {{ filename }}:
- module: apache-reload
- service: apache

{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}


{% endif %}{# Debian #}

Laden…
Annuleren
Opslaan