From 285163f5f9e4ff250e2f754a11416bba2d195a12 Mon Sep 17 00:00:00 2001 From: sTiKyt Date: Fri, 8 May 2020 11:42:44 +0300 Subject: [PATCH] Fixed set_php() setting host instead of port --- Defs/ActionManager/Server/server_runner.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Defs/ActionManager/Server/server_runner.py b/Defs/ActionManager/Server/server_runner.py index 35b042e..983f35f 100644 --- a/Defs/ActionManager/Server/server_runner.py +++ b/Defs/ActionManager/Server/server_runner.py @@ -9,18 +9,19 @@ exit_server_www = chdir("../..") def set_php(host = '127.0.0.1', port = 80): - run_background_command(["php", "-S", "{0}:{1}".format(host, port)], stdout=DEVNULL, stderr=DEVNULL) - + #run_background_command(["php", "-S", "{0}:{1}".format(host, port), "-t", "Server/www"], stdout=DEVNULL, stderr=DEVNULL) + run_command(['killall','-2','php'], stdout=DEVNULL, stderr=DEVNULL) + run_background_command(["php", "-S", "{0}:{1}".format(host, port), "-t", "Server/www"]) def set_port(port = 80): run_background_command(["fuser", "-k", "{0}/tcp".format(port)], stdout=DEVNULL, stderr=DEVNULL) def start_server(port = 80): #run_command(["fuser", "-k", "{0}/tcp".format(port), ">", "/dev/null", "2>&1"**/]) - set_port - enter_server_www + set_port(port) + #enter_server_www #run_command(["php", "-S", "127.0.0.1:{0}".format(port), ">", "/dev/null", "2>&1", "&"]) - set_php(port) - exit_server_www + set_php(port=port) + #exit_server_www def start_localhost(port): run_command('clear')