Browse Source

nginx: update requirements for cache directory

Karsten Böddeker 6 years ago
parent
commit
70e8e640f2
1 changed files with 4 additions and 2 deletions
  1. 4 2
      nginx/init.sls

+ 4 - 2
nginx/init.sls

@@ -15,7 +15,6 @@ nginx:
     - reload: TRUE
     - require:
       - pkg: nginx
-      - file: nginx-cache
     - watch:
       - cmd: nginx-configtest
 
@@ -35,6 +34,10 @@ nginx-cache:
     - name: /srv/cache
     - user: www-data
     - group: www-data
+    - require:
+      - pkg: nginx
+    - require_in:
+      - cmd: nginx-configtest
 
 # Install meaningful main configuration (SSL tweaks 'n stuff)
 /etc/nginx/nginx.conf:
@@ -44,7 +47,6 @@ nginx-cache:
     - watch_in:
       - cmd: nginx-configtest
 
-
 # Disable default configuration
 /etc/nginx/sites-enabled/default:
   file.absent: