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
- cd apisix/
- make run
- make run
- 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