Help Center/ CodeArts Deploy/ FAQs/ Custom Application Actions/ Running Shell Commands/ Service Is Not Started But the Log Shows That Shell Commands Are Successfully Executed
Updated on 2023-05-26 GMT+08:00

Service Is Not Started But the Log Shows That Shell Commands Are Successfully Executed

Symptoms

The log shows that the deployment of the shell command /usr/local/tomcat/bin/startup.sh is successful, but no process corresponding to the service is found on the server.

Cause Analysis

When Ansible deploys a shell command, the corresponding process is forcibly stopped after the deployment is complete. As a result, the service process cannot be found.

Solution

Make the shell command run in the background.

nohup /usr/local/tomcat/bin/startup.sh &