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