DRILL-953: Handle the case in which /var/log/drill does not exist
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/4243f54d Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/4243f54d Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/4243f54d Branch: refs/heads/master Commit: 4243f54d16a5595f0a09f6f01a9c9426651d95b2 Parents: 7d43669 Author: Patrick Wong <[email protected]> Authored: Wed Jun 18 21:57:35 2014 +0000 Committer: Jacques Nadeau <[email protected]> Committed: Wed Jun 18 21:46:31 2014 -0700 ---------------------------------------------------------------------- distribution/src/resources/drill-config.sh | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/4243f54d/distribution/src/resources/drill-config.sh ---------------------------------------------------------------------- diff --git a/distribution/src/resources/drill-config.sh b/distribution/src/resources/drill-config.sh index 98ae8e5..795e97a 100644 --- a/distribution/src/resources/drill-config.sh +++ b/distribution/src/resources/drill-config.sh @@ -82,6 +82,12 @@ if [ "$DRILL_LOG_DIR" = "" ]; then DRILL_LOG_DIR=/var/log/drill fi +if [ ! -d $DRILL_LOG_DIR ]; then + echo "Drill log directory $DRILL_LOG_DIR does not exist, defaulting to $DRILL_HOME/log" + DRILL_LOG_DIR=$DRILL_HOME/log + mkdir -p $DRILL_LOG_DIR +fi + # If HADOOP_HOME is specified, add all Hadoop jars except those # specifically excluded in $DRILL_HOME/bin/hadoop-excludes.txt if [ "${HADOOP_HOME}x" != "x" ] ; then
