Skip to content

Commit

Permalink
really disable the speedtest plugin if config option is '0'
Browse files Browse the repository at this point in the history
  • Loading branch information
cremesk committed Dec 4, 2024
1 parent e442351 commit cbdbedf
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions salt/freifunk/base/tools/speedtest.sls
Original file line number Diff line number Diff line change
@@ -1,26 +1,7 @@
{% from 'config.jinja' import apache_ddos_prevent %}
{% from 'config.jinja' import apache_ddos_prevent, apache_speedtest %}
{# backend server for speedtest.ffdd #}
{% if apache_ddos_prevent == '1' %}
apache2_speedtest_disable:
service:
- running
- name: apache2
- enable: True
- restart: True
- watch:
- apache2_site_disable_speedtest-backend
- require:
- pkg: apache2
- apache2_site_disable_speedtest-backend
apache2_site_disable_speedtest-backend:
apache_site.disabled:
- name: speedtest-backend
- require:
- pkg: apache2
{% else %}
{% if apache_ddos_prevent == '0' and apache_speedtest == '1' %}
apache2_speedtest_enable:
service:
- running
Expand Down Expand Up @@ -65,4 +46,23 @@ apache2_site_enable_speedtest-backend:
- file: /etc/apache2/sites-available/speedtest-backend.conf
- speedtest-backend_repo
{% else %}
apache2_speedtest_disable:
service:
- running
- name: apache2
- enable: True
- restart: True
- watch:
- apache2_site_disable_speedtest-backend
- require:
- pkg: apache2
- apache2_site_disable_speedtest-backend
apache2_site_disable_speedtest-backend:
apache_site.disabled:
- name: speedtest-backend
- require:
- pkg: apache2
{% endif %}

0 comments on commit cbdbedf

Please sign in to comment.