[Kimchi-devel] [PATCH] Fix issue stopping nginx proxy

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Wed Oct 7 02:02:03 UTC 2015


Kimchi/Wok tries to stop nginx proxy wrongly. This patch adds the
configuration file to the command, then nginx is stopped correctly,
avoiding the message in log:
"""
nginx: [emerg] "user" directive is not allowed here in
/etc/nginx/conf.d/kimchi.conf:23
"""

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
---
 src/wok/proxy.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/wok/proxy.py b/src/wok/proxy.py
index 46ce857..10008da 100644
--- a/src/wok/proxy.py
+++ b/src/wok/proxy.py
@@ -103,5 +103,6 @@ def start_proxy(options):
 
 def terminate_proxy():
     """Stop nginx process."""
-    term_proxy_cmd = ['nginx', '-s', 'stop']
+    config_file = "%s/wok.conf" % paths.nginx_conf_dir
+    term_proxy_cmd = ['nginx', '-s', 'stop', '-c', config_file]
     subprocess.call(term_proxy_cmd)
-- 
2.1.0




More information about the Kimchi-devel mailing list