fixes
diff --git a/server.sls b/server.sls
index 50dfa40..6b64e33 100755
--- a/server.sls
+++ b/server.sls
@@ -10,6 +10,7 @@
   - mode: 755
   - makedirs: true
 
+
 {% if pillar.grafana.server.source.type == 'git' %}
 
 grafana_repository:
@@ -21,6 +22,14 @@
     - file: /srv/grafana
     - pkg: git_packages
 
+/srv/grafana/site/src/config.js:
+  file:
+  - managed
+  - source: salt://grafana/conf/config.js
+  - template: jinja
+  - require:
+    - git: grafana_repository
+
 grafana_install:
   cmd.run:
   - names: 
@@ -31,7 +40,6 @@
   - require:
     - git: grafana_repository
 
-
 grafana_grun_build:
   cmd.run:
   - names: 
@@ -40,16 +48,8 @@
   - unless: test -e /srv/grafana/site/dist
   - require:
     - git: grafana_repository
-
+    - file: /srv/grafana/site/src/config.js
 
 {% endif %}
 
-/srv/grafana/site/src/config.js:
-  file:
-  - managed
-  - source: salt://grafana/conf/config.js
-  - template: jinja
-  - require:
-    - cmd: grafana_install
-
 {%- endif %}