[uwsgi] enabled switch in uwsgi
authorArthur Lutz <arthur.lutz@logilab.fr>
Fri, 03 Feb 2017 11:43:59 +0100
changeset 116 1c7834b59c18
parent 115 3294a6c15704
child 117 70ad5cc2bf8d
[uwsgi] enabled switch in uwsgi
cubicweb/uwsgi/init.sls
pillar.example
--- a/cubicweb/uwsgi/init.sls	Thu Feb 02 17:44:13 2017 +0100
+++ b/cubicweb/uwsgi/init.sls	Fri Feb 03 11:43:59 2017 +0100
@@ -25,6 +25,7 @@
     - require:
       - pkg: uwsgi install
 
+{% if 'enabled' in config.cwapp_uwsgi_options.keys() and config.cwapp_uwsgi_options.enabled %}
 /etc/uwsgi/apps-enabled/{{ name }}.ini:
   file.symlink:
     - target: /etc/uwsgi/apps-available/{{ name }}.ini
@@ -33,6 +34,7 @@
       - file: /etc/uwsgi/apps-available/{{ name }}.ini
     - watch_in:
       - service: uwsgi
+{% endif %}
 
 {% if 'file' in  config.cwapp_uwsgi_options.keys() %}
 {% if config.cwapp_uwsgi_options.file %}
--- a/pillar.example	Thu Feb 02 17:44:13 2017 +0100
+++ b/pillar.example	Fri Feb 03 11:43:59 2017 +0100
@@ -67,6 +67,7 @@
         workers: 2
         threads: 8
         #file: /etc/cubicweb.d/app/wsgiapp.py
+        #enabled: false
       pyramid:
         sessions_secret: CHANGEME
         authtk_sessions_secret: CHANGEME