fastcgi: Pass the site dir to each fastcgi daemon.
authorMatthijs Kooijman <matthijs@stdin.nl>
Fri, 3 Apr 2009 11:29:53 +0000 (13:29 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Fri, 3 Apr 2009 11:29:53 +0000 (13:29 +0200)
etc/init.d/fastcgi

index 26e800c243512cb77e01837369345711d00e3942..bd5690f1f2eb8dd81a1bd0ce3f29f67202640161 100755 (executable)
@@ -76,6 +76,9 @@ for (site, apps) in SITES:
        site_dir   = os.path.join(ROOT_DIR, site)
        socket_dir = os.path.join(SOCKET_DIR, site_name)
 
+       # Pass the site dir to all fastcgi processes
+       os.environ['SITE_DIR'] = site_dir
+
        if not site_dir:
                raise Exception("Site dir does not exist: %s" % (site_dir))