Changeset 2740 for trunk/packages/invirt-web/code
- Timestamp:
- Dec 21, 2009, 12:14:15 AM (15 years ago)
- Location:
- trunk/packages/invirt-web
- Files:
-
- 3 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-web
- Property svn:mergeinfo changed
/package_branches/invirt-web/cherrypy-rebased merged: 2739
- Property svn:mergeinfo changed
-
trunk/packages/invirt-web/code/invirt.fcgi
r2737 r2740 12 12 13 13 def usage(): 14 print >>sys.stderr, """%s [config] 14 argv0_dir = os.path.dirname(sys.argv[0]) 15 print >>sys.stderr, """%s <unauth|auth> [config] 16 %s/auth.fcgi [config] 17 %s/unauth.fcgi [config] 15 18 16 19 Run server as FastCGI, with CherryPy config from "main.conf". … … 19 22 20 23 Run this script as either 'auth.fcgi' or 'unauth.fcgi', to get 21 the authenticated or unauthenticated site respectively. 22 """ % sys.argv[0] 24 the authenticated or unauthenticated site respectively, or pass 25 'auth' or 'unauth' as the first parameter. 26 """ % (sys.argv[0], argv0_dir, argv0_dir) 23 27 sys.exit(2) 24 28 25 29 if __name__ == "__main__": 26 if len(sys.argv) > 2:30 if len(sys.argv) > 3 or len(sys.argv) == 1 or '-h' in sys.argv or '--help' in sys.argv: 27 31 usage() 28 if len(sys.argv) > 1: 29 if sys.argv[1] in ('-h', '--help'): 30 usage() 31 conf_file = sys.argv[1] 32 if len(sys.argv) == 3: 33 mode = sys.argv[1] 34 conf_file = sys.argv[2] 32 35 dev = True 33 36 else: 37 mode = sys.argv[1] 34 38 conf_file = os.path.join(base_dir, 'main.conf') 35 39 … … 40 44 } 41 45 42 if os.path.basename(sys.argv[0]).startswith('auth'):46 if mode.startswith('auth'): 43 47 root = main.InvirtWeb() 44 elif os.path.basename(sys.argv[0]).startswith('unauth'): 48 app_config['/']['tools.mako.module_directory'] = "/tmp/invirt-auth-web-templatecache" 49 elif mode.startswith('unauth'): 45 50 root = main.InvirtUnauthWeb() 51 app_config['/']['tools.mako.module_directory'] = "/tmp/invirt-unauth-web-templatecache" 46 52 else: 47 53 usage() -
trunk/packages/invirt-web/code/main.conf
r2737 r2740 3 3 #auto_reload doesn't work with FastCGI 4 4 engine.auto_reload = False 5 tools.mako.module_directory = "/tmp/invirt-web-templatecache"6 5 tools.remote_user_login.on = True 7 6
Note: See TracChangeset
for help on using the changeset viewer.