|
|
@ -7,7 +7,7 @@ if [ -z "$(ps -ef | grep java | grep -v grep)" ] |
|
|
|
then |
|
|
|
then |
|
|
|
echo "wait 5 seconds ..." |
|
|
|
echo "wait 5 seconds ..." |
|
|
|
sleep 5s |
|
|
|
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 ] |
|
|
|
if [ $? == 0 ] |
|
|
|
then |
|
|
|
then |
|
|
|
echo "The agent have started successfully!" |
|
|
|
echo "The agent have started successfully!" |
|
|
@ -19,7 +19,7 @@ else |
|
|
|
echo "wait 1 minutes ..." |
|
|
|
echo "wait 1 minutes ..." |
|
|
|
sleep 1m |
|
|
|
sleep 1m |
|
|
|
echo "Starting agent ..." |
|
|
|
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 ] |
|
|
|
if [ $? == 0 ] |
|
|
|
then |
|
|
|
then |
|
|
|
echo "The agent have started successfully!" |
|
|
|
echo "The agent have started successfully!" |
|
|
|