X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=etc%2Finit.d%2Ffastcgi;h=835ecb9f4c444db1e7f57f32c7315be210ca413d;hb=554023e3ee2c57f97c61eca5ce2f000fdf417850;hp=26e800c243512cb77e01837369345711d00e3942;hpb=44024da1dfb8e72d59dce0e25313898848fba0a7;p=matthijs%2Fservers%2Fdrsnuggles.git diff --git a/etc/init.d/fastcgi b/etc/init.d/fastcgi index 26e800c..835ecb9 100755 --- a/etc/init.d/fastcgi +++ b/etc/init.d/fastcgi @@ -23,13 +23,20 @@ ROOT_DIR="/data/www" SITES=[ - ('stderr.nl', ['php']), -# ('stdin.nl', ['php']), + ('stderr.nl', ['php', ('trac', 'applications/trac/trac.fcgi')]), + ('stdin.nl', ['php']), ('stdout.nl', ['php']), ('ninniach.nl', ['php']), -# ('evolution-events.nl', ['php']), #, ('xerxes', 'applications/xerxes/manage.py runfcgi'), ('wipi', 'applications/wipi/wipi.fcgi')]), + ('blues-brothers.eu', ['php']), + ('evolution-events.nl', ['php', + ('wipi', 'applications/wipi/wipi.fcgi'), + ('hunternet', 'applications/lexnet/manage.py runfcgi'), + ('xerxes', 'applications/xerxes/manage.py runfcgi'), + ('dorestad-bookings', 'applications/dorestad-bookings/manage.py.local runfcgi debug=true'), + ]), # ('stdio.flexvps.nl', ['php']), # ('foresightsecurity.nl', ['php']), + ('chimara-if.org', ['php', ('trac', 'applications/trac/trac.fcgi')]), ] # Generic applications that can be run for any site @@ -40,7 +47,7 @@ APPLICATIONS={"php": "/usr/bin/php-cgi"} # Kill these procs before starting new ones. Only processes of these names that # are run by the sites in SITES are killed. This is a bit hackish, we should # really be using pidfiles... -KILL_PROCS=['php-cgi', 'manage.py'] +KILL_PROCS=['php-cgi', 'manage.py', 'manage.py.local', 'trac.fcgi', 'wipi.fcgi'] ## ABSOLUTE path to the spawn-fcgi binary SPAWNFCGI="/usr/bin/spawn-fcgi" @@ -76,6 +83,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))