From b93f8f6c2e1cb7ba6c5858168ae8990238911353 Mon Sep 17 00:00:00 2001 From: Connor Hindley Date: Wed, 27 Aug 2014 18:55:51 -0400 Subject: [PATCH] check if we have a maintenance.pid in status properly report status --- bin/control | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/control b/bin/control index 3a30c33..a3c762a 100755 --- a/bin/control +++ b/bin/control @@ -1,6 +1,9 @@ #!/bin/bash function is_node_running { + if [ -f ${OPENSHIFT_DATA_DIR}/maintenance.pid ]; then + exit 0 + fi ps axco command | grep -w '^node$' > /dev/null } @@ -21,6 +24,7 @@ function status() { function start() { echo "Stopping maintenance web server." kill -9 `cat ${OPENSHIFT_DATA_DIR}/maintenance.pid` + rm ${OPENSHIFT_DATA_DIR}/maintenance.pid logf="$OPENSHIFT_NODEJS_LOG_DIR/node.log" if [ -f "${OPENSHIFT_REPO_DIR}package.json" ]; then