From 3ea814349dd35ee8ffdd2d564a5c690f8f1be291 Mon Sep 17 00:00:00 2001 From: "Steve L. Nyemba" Date: Tue, 29 Aug 2017 00:54:04 -0500 Subject: [PATCH] DC - update startup script for data collector --- init.sh | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/init.sh b/init.sh index 4339bb4..daab9a4 100644 --- a/init.sh +++ b/init.sh @@ -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 +$1 -fi