Author: damoxc
Revision: 5840
Log:
add the option to fork the webui
Diff:
Modified: branches/1.2_RC/ChangeLog
===================================================================
--- branches/1.2_RC/ChangeLog 2009-10-13 09:56:49 UTC (rev 5839)
+++ branches/1.2_RC/ChangeLog 2009-10-13 11:32:40 UTC (rev 5840)
@@ -6,10 +6,11 @@
==== Core ====
* Fix saving torrent state on fresh configs
-
+
==== Web ====
- * Fix changing of the allocation in the preferences.
- * Fix updating the Connection Manager when a host is added.
+ * Fix changing of the allocation in the preferences.
+ * Fix updating the Connection Manager when a host is added.
+ * Add a --fork option to allow forking the webui to the background
==== Misc ====
* Add man pages for deluge-console and deluge-gtk
Modified: branches/1.2_RC/deluge/ui/web/web.py
===================================================================
--- branches/1.2_RC/deluge/ui/web/web.py 2009-10-13 09:56:49 UTC (rev
5839)
+++ branches/1.2_RC/deluge/ui/web/web.py 2009-10-13 11:32:40 UTC (rev
5840)
@@ -33,6 +33,8 @@
#
#
+import os
+
from deluge.ui.ui import _UI, UI
from optparse import OptionGroup
@@ -51,6 +53,9 @@
self.__server = None
group = OptionGroup(self.parser, "Web Options")
+ group.add_option("-f", "--fork", dest="fork",
+ help="Fork the web interface process into the background",
+ action="store_true", default=False)
group.add_option("-p", "--port", dest="port", type="int",
help="Sets the port to be used for the webserver",
action="store", default=None)
@@ -72,6 +77,11 @@
def start(self):
super(Web, self).start()
+ if self.options.fork:
+ if os.fork():
+ exit(0)
+
+
import server
self.__server = server.DelugeWeb()
Modified: trunk/deluge/ui/web/web.py
===================================================================
--- trunk/deluge/ui/web/web.py 2009-10-13 09:56:49 UTC (rev 5839)
+++ trunk/deluge/ui/web/web.py 2009-10-13 11:32:40 UTC (rev 5840)
@@ -33,6 +33,8 @@
#
#
+import os
+
from deluge.ui.ui import _UI, UI
from optparse import OptionGroup
@@ -51,6 +53,9 @@
self.__server = None
group = OptionGroup(self.parser, "Web Options")
+ group.add_option("-f", "--fork", dest="fork",
+ help="Fork the web interface process into the background",
+ action="store_true", default=False)
group.add_option("-p", "--port", dest="port", type="int",
help="Sets the port to be used for the webserver",
action="store", default=None)
@@ -72,6 +77,11 @@
def start(self):
super(Web, self).start()
+ if self.options.fork:
+ if os.fork():
+ exit(0)
+
+
import server
self.__server = server.DelugeWeb()
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---