diff options
author | Marcos Pinto <markybob@dipconsultants.com> | 2007-10-14 23:07:20 +0000 |
---|---|---|
committer | Marcos Pinto <markybob@dipconsultants.com> | 2007-10-14 23:07:20 +0000 |
commit | 30b5967f12871e28ce2ac42ccd588181a44ae643 (patch) | |
tree | 1ed12ed15ba1eaca4bae2c8ced906b3b6314ee68 | |
parent | f54f2a50ec9b83822db3ee1f6087b9d2d754951a (diff) | |
download | deluge-30b5967f12871e28ce2ac42ccd588181a44ae643.tar.gz deluge-30b5967f12871e28ce2ac42ccd588181a44ae643.tar.bz2 deluge-30b5967f12871e28ce2ac42ccd588181a44ae643.zip |
if already running on init, kill
-rw-r--r-- | plugins/WebUi/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/WebUi/__init__.py b/plugins/WebUi/__init__.py index 85b559bd9..559e380a2 100644 --- a/plugins/WebUi/__init__.py +++ b/plugins/WebUi/__init__.py @@ -78,7 +78,9 @@ class plugin_WebUi(object): self.interface = deluge_interface self.proc = None self.web_server = None - + if not deluge.common.windows_check(): + if os.WEXITSTATUS(os.system('ps x -o pid,args |grep -v grep |grep -q run_webserver')): + os.system('killall run_webserver') self.config_file = deluge.common.CONFIG_DIR + "/webui.conf" self.config = deluge.pref.Preferences(self.config_file, False) try: |