Commits

Christian Theune  committed 7e617e9

gocept.net nginx platform component: copy generated config to correct target
directory.

  • Participants
  • Parent commits 0d6b2ac

Comments (0)

Files changed (1)

File components/nginx/component.py

     def configure(self):
         # copy all .conf files in workingdir to /etc/nginx/local
         # trigger sudo /etc/init.d/nginx reload
-        pass
+        for f in self.parent.sub_components:
+            if not isinstance(f, File):
+                continue
+            if not f.path.endswith('.conf'):
+                continue
+            self += File(
+                '/etc/nginx/local/%s' % os.path.basename(f.path),
+                source=f.path)