Changeset 66b54d6
- Timestamp:
- 03/06/2014 07:50:40 PM (11 years ago)
- Branches:
- 2.0.x, develop, master
- Children:
- dbf4f6
- Parents:
- 30705d6
- git-author:
- Calum Lind <calumlind+deluge@gmail.com> (03/06/2014 07:46:08 PM)
- git-committer:
- Calum Lind <calumlind+deluge@gmail.com> (03/06/2014 07:50:40 PM)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
deluge/ui/web/web.py
r30705d6 r66b54d6 40 40 from optparse import OptionGroup 41 41 42 42 43 class WebUI(UI): 43 44 def __init__(self, args): … … 45 46 deluge_web = server.DelugeWeb() 46 47 deluge_web.start() 48 47 49 48 50 class Web(_UI): … … 52 54 def __init__(self): 53 55 super(Web, self).__init__("web") 54 self.__server = 56 self.__server = None 55 57 56 58 group = OptionGroup(self.parser, "Web Options") 57 59 group.add_option("-b", "--base", dest="base", 58 help="Set the base path that the ui is running on (proxying)",59 action="store", default=None)60 help="Set the base path that the ui is running on (proxying)", 61 action="store", default=None) 60 62 if not (deluge.common.windows_check() or deluge.common.osx_check()): 61 group.add_option("-d", "--do-not-daemonize", dest="donotdaemonize", 62 help="Do not daemonize the web interface", action="store_true", default=False) 63 group.add_option("-d", "--do-not-daemonize", dest="donotdaemonize", 64 help="Do not daemonize the web interface", 65 action="store_true", default=False) 63 66 group.add_option("-P", "--pidfile", dest="pidfile", type="str", 64 help="Use pidfile to store process id",65 action="store", default=None)67 help="Use pidfile to store process id", 68 action="store", default=None) 66 69 if not deluge.common.windows_check(): 67 70 group.add_option("-U", "--user", dest="user", type="str", 68 help="User to switch to. Only use it when starting as root",69 action="store", default=None)71 help="User to switch to. Only use it when starting as root", 72 action="store", default=None) 70 73 group.add_option("-g", "--group", dest="group", type="str", 71 help="Group to switch to. Only use it when starting as root",72 action="store", default=None)74 help="Group to switch to. Only use it when starting as root", 75 action="store", default=None) 73 76 group.add_option("-i", "--interface", dest="interface", 74 type="str", help="Binds the webserver to a specific IP address",75 action="store", default=None)77 type="str", help="Binds the webserver to a specific IP address", 78 action="store", default=None) 76 79 group.add_option("-p", "--port", dest="port", type="int", 77 help="Sets the port to be used for the webserver",78 action="store", default=None)80 help="Sets the port to be used for the webserver", 81 action="store", default=None) 79 82 group.add_option("--profile", dest="profile", 80 help="Profile the web server code",81 action="store_true", default=False)83 help="Profile the web server code", 84 action="store_true", default=False) 82 85 try: 83 86 import OpenSSL 87 OpenSSL.__version__ 84 88 except: 85 89 pass 86 90 else: 87 91 group.add_option("--no-ssl", dest="ssl", action="store_false", 88 help="Forces the webserver to disable ssl", default=False)92 help="Forces the webserver to disable ssl", default=False) 89 93 group.add_option("--ssl", dest="ssl", action="store_true", 90 help="Forces the webserver to use ssl", default=False)94 help="Forces the webserver to use ssl", default=False) 91 95 self.parser.add_option_group(group) 92 96 … … 168 172 run_server() 169 173 174 170 175 def start(): 171 176 web = Web()
Note:
See TracChangeset
for help on using the changeset viewer.