|
|
|
@ -26,12 +26,7 @@ upgrade(){
|
|
|
|
|
}
|
|
|
|
|
start(){
|
|
|
|
|
|
|
|
|
|
if [ "$1" = "collector" ]; then
|
|
|
|
|
sandbox/bin/python src/utils/agents/data-collector.py --path $PWD/config.json
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
sandbox/bin/python src/api/index.py --path $PWD/config.json &
|
|
|
|
|
fi
|
|
|
|
|
sandbox/bin/python src/api/index.py --path $PWD/config.json
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
stop(){
|
|
|
|
@ -42,15 +37,9 @@ stop(){
|
|
|
|
|
status(){
|
|
|
|
|
pid=`ps -eo pid,command|grep python|grep -E "$PWD"|grep index.py|grep -E "^ {0,}[0-9]+" -m 1 -o`
|
|
|
|
|
if [ "$pid" = "" ]; then
|
|
|
|
|
echo "API IS OFFLINE"
|
|
|
|
|
else
|
|
|
|
|
echo "API IS ONLINE $pid"
|
|
|
|
|
fi
|
|
|
|
|
pid=`ps -eo pid,command|grep python|grep -E "$PWD"|grep data-collector|grep -E "^ {0,}[0-9]+" -m 1 -o`
|
|
|
|
|
if [ "$pid" = "" ]; then
|
|
|
|
|
echo "DATA-COLLECTOR IS OFFLINE"
|
|
|
|
|
echo "Monitor API is Offline"
|
|
|
|
|
else
|
|
|
|
|
echo "DATA-COLLECTOR IS ONLINE $pid"
|
|
|
|
|
echo "Monitor API is Online $pid"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|