From 351d570684fe44f160b878ee5b0d48f6d83eb1ee Mon Sep 17 00:00:00 2001 From: Nishant Date: Mon, 2 Jan 2017 22:50:22 +0530 Subject: [PATCH] Improve startup script - create PID and LOG dir if they do not exist (#3808) --- examples/bin/node.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/bin/node.sh b/examples/bin/node.sh index e6a6d0adb03..cd9c25ddf6d 100644 --- a/examples/bin/node.sh +++ b/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