Skip to content

Commit

Permalink
check if we have a maintenance.pid in status
Browse files Browse the repository at this point in the history
properly report status
  • Loading branch information
connyay committed Aug 27, 2014
1 parent 009f499 commit b93f8f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/control
Original file line number Diff line number Diff line change
@@ -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
}

Expand All @@ -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
Expand Down

0 comments on commit b93f8f6

Please sign in to comment.