make the logs output to null.

master
livejq 3 years ago
parent fad1fd09b3
commit b7dd387052
  1. 4
      Agent/AgentRestart.sh

@ -7,7 +7,7 @@ if [ -z "$(ps -ef | grep java | grep -v grep)" ]
then
echo "wait 5 seconds ..."
sleep 5s
nohup java -jar /var/monitor_agent/agentMain.jar /var/monitor_agent/conf &
nohup java -jar /var/monitor_agent/agentMain.jar /var/monitor_agent/conf 2>&1 > /dev/null &
if [ $? == 0 ]
then
echo "The agent have started successfully!"
@ -19,7 +19,7 @@ else
echo "wait 1 minutes ..."
sleep 1m
echo "Starting agent ..."
nohup java -jar /var/monitor_agent/agentMain.jar /var/monitor_agent/conf &
nohup java -jar /var/monitor_agent/agentMain.jar /var/monitor_agent/conf 2>&1 > /dev/null &
if [ $? == 0 ]
then
echo "The agent have started successfully!"

Loading…
Cancel
Save