Changeset 2741 for trunk/packages/invirt-web
- Timestamp:
- Dec 21, 2009, 12:22:22 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-web/code/invirt.fcgi
r2740 r2741 14 14 argv0_dir = os.path.dirname(sys.argv[0]) 15 15 print >>sys.stderr, """%s <unauth|auth> [config] 16 %s/auth.fcgi [config]17 %s/unauth.fcgi [config]18 16 19 17 Run server as FastCGI, with CherryPy config from "main.conf". 20 21 18 With `config`, run standalone with CherryPy config from `config`. 22 19 23 Run this script as either 'auth.fcgi' or 'unauth.fcgi', to get 24 the authenticated or unauthenticated site respectively, or pass 25 'auth' or 'unauth' as the first parameter. 20 Serve the authenticated or unauthenticated site according to 21 the first argument. 22 23 Helper scripts "auth.fcgi" and "unauth.fcgi" are provided to 24 facilitate running the server with no arguments. 26 25 """ % (sys.argv[0], argv0_dir, argv0_dir) 27 26 sys.exit(2) 28 27 29 28 if __name__ == "__main__": 30 if len(sys.argv) > 3 or len(sys.argv) == 1 or'-h' in sys.argv or '--help' in sys.argv:29 if '-h' in sys.argv or '--help' in sys.argv: 31 30 usage() 31 if not (2 <= len(sys.argv) <= 3): 32 usage() 33 34 mode = sys.argv[1] 32 35 if len(sys.argv) == 3: 33 mode = sys.argv[1]34 36 conf_file = sys.argv[2] 35 37 dev = True 36 38 else: 37 mode = sys.argv[1]38 39 conf_file = os.path.join(base_dir, 'main.conf') 39 40
Note: See TracChangeset
for help on using the changeset viewer.