Describe the bug
If there are more than one pids, when executing bin/shutdown.sh, the output will be separated to multi-lines.
Expected behavior
$ sh bin/shutdown.sh
The nacosServer(39511 40444) is running...
Send shutdown request to nacosServer(39511 40444) OK
Actually behavior
$ sh bin/shutdown.sh
The nacosServer(39511
40444) is running...
Send shutdown request to nacosServer(39511
40444) OK
How to Reproduce
Steps to reproduce the behavior:
- Start two nacos server instance.
- Run
bin/shutdown.sh.
- See the output.
Desktop (please complete the following information):
- OS: Fedora
- Version nacos-server 3.0.2
- Module bin
Additional context
The problem is caused by pgrep, which puts one pid in one new line. I think we can add | xargs after pgrep -f nacos.nacos to format the output.
This does not have functional issues.