提交 d39cff6d 编写于 作者: wu-sheng's avatar wu-sheng 提交者: GitHub

Merge pull request #188 from xcaspar/feature/180

chore(collector): add a check for process id in startup script
......@@ -24,10 +24,14 @@ echo "Starting collector...."
eval exec "\"$_RUNJAVA\" ${JAVA_OPTS} -classpath $CLASSPATH org.skywalking.apm.collector.worker.CollectorBootStartUp \
2>${COLLECTOR_LOGS_DIR}/collector.log 1> /dev/null &"
if [ $? -eq 0 ]; then
sleep 1
echo "Collector started successfully!"
else
echo "Collector started failure!"
exit 1
retval=$?
pid=$!
FAIL_MSG="Collector started failure!"
SUCCESS_MSG="Collector started successfully!"
[ ${retval} -eq 0 ] || (echo ${FAIL_MSG}; exit ${retval})
sleep 1
if ! ps -p ${pid} > /dev/null ; then
echo ${FAIL_MSG}
exit 1
fi
echo ${SUCCESS_MSG}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册