From 30b5967f12871e28ce2ac42ccd588181a44ae643 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Sun, 14 Oct 2007 23:07:20 +0000 Subject: [PATCH] if already running on init, kill --- plugins/WebUi/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: