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

This commit is contained in:
Nishant 2017-01-02 22:50:22 +05:30 committed by Charles Allen
parent 02519d5b64
commit 351d570684
1 changed files with 2 additions and 1 deletions

View File

@ -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