Permalink
Browse files

Improve startup script - create PID and LOG dir if they do not exist (#…

  • Loading branch information...
1 parent 02519d5 commit 351d570684fe44f160b878ee5b0d48f6d83eb1ee @nishantmonu51 nishantmonu51 committed with drcrallen Jan 2, 2017
Showing with 2 additions and 1 deletion.
  1. +2 −1 examples/bin/node.sh
@@ -38,7 +38,8 @@ case $command in
exit 1
fi
fi
-
+ if [ ! -d "$PID_DIR" ]; then mkdir -p $PID_DIR; fi
+ if [ ! -d "$LOG_DIR" ]; then mkdir -p $LOG_DIR; fi
nohup java `cat $CONF_DIR/$nodeType/jvm.config | xargs` -cp $CONF_DIR/_common:$CONF_DIR/$nodeType:$LIB_DIR/*:$HADOOP_CONF_DIR io.druid.cli.Main server $nodeType > $LOG_DIR/$nodeType.log &
nodeType_PID=$!
echo $nodeType_PID > $pid

0 comments on commit 351d570

Please sign in to comment.