KevinHoo opened a new issue #1690:
URL: https://github.com/apache/incubator-apisix/issues/1690


   ### Issue description
   重复执行 make run 会启动多个master进程,而 make stop 只能停止一个
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 1.3
   * OS: centos7
   
   ### Minimal test code / Steps to reproduce the issue
   1. cd apisix/
   2. make run
   3. make run
   4. ps aux | grep apisix | grep master
   
   
   ### What's the actual result? (including assertion message & call stack if 
applicable)
   系统启动了两个 openresty 实例
   
   
   ### What's the expected result?
   如果已有运行中的openresty实例,则不需要再启动新的实例
   
   思路:判断/logs/nginx.pid 存在,表示服务已启动
   
   Makefile line 82 ~ 84
           mkdir -p logs
           mkdir -p /tmp/apisix_cores/
           $(OR_EXEC) -p $$PWD/ -c $$PWD/conf/nginx.conf
   
   修改为:
   ifeq ("$(wildcard logs/nginx.pid)", "")
        mkdir -p logs
        mkdir -p /tmp/apisix_cores/
        $(OR_EXEC) -p $$PWD/ -c $$PWD/conf/nginx.conf
   else
        @echo "Apisix is running..."
   endif
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to