DC - update startup script for data collector

data-collector
Steve L. Nyemba 7 years ago
parent 6b23703aa2
commit 3ea814349d

@ -15,6 +15,10 @@ install(){
}
register(){
#
# $1 uid customer's identifier (email)
# $2 pid customer's plan identifier
#
curl -X POST https://the-phi.com/store/init/monitor-logs -H "uid:$1" -H"pid: $2"
@ -40,12 +44,6 @@ 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"
@ -55,13 +53,5 @@ status(){
}
if [ "$1" = "start" ]; then
if [ "$2" = "collector" ]; then
start "collector"
else
start
fi
else
$1
fi

Loading…
Cancel
Save