if already running on init, kill

This commit is contained in:
Marcos Pinto 2007-10-14 23:07:20 +00:00
parent f54f2a50ec
commit 30b5967f12
1 changed files with 3 additions and 1 deletions

View File

@ -78,7 +78,9 @@ class plugin_WebUi(object):
self.interface = deluge_interface self.interface = deluge_interface
self.proc = None self.proc = None
self.web_server = 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_file = deluge.common.CONFIG_DIR + "/webui.conf"
self.config = deluge.pref.Preferences(self.config_file, False) self.config = deluge.pref.Preferences(self.config_file, False)
try: try: