9fba71
From 2b9f0418ba16e828657f5353510f5d28a60d022a Mon Sep 17 00:00:00 2001
9fba71
From: Michal Srb <msrb@redhat.com>
9fba71
Date: Mon, 22 Apr 2013 07:56:08 +0200
9fba71
Subject: [PATCH] create work dir
9fba71
9fba71
---
9fba71
 jetty-distribution/src/main/resources/bin/jetty.sh | 7 +++++++
9fba71
 1 file changed, 7 insertions(+)
9fba71
9fba71
diff --git a/jetty-distribution/src/main/resources/bin/jetty.sh b/jetty-distribution/src/main/resources/bin/jetty.sh
9fba71
index cc3f771..9bd15c7 100755
9fba71
--- a/jetty-distribution/src/main/resources/bin/jetty.sh
9fba71
+++ b/jetty-distribution/src/main/resources/bin/jetty.sh
9fba71
@@ -348,6 +348,13 @@ JETTY_STATE=$(dirname $JETTY_PID)/jetty.state
9fba71
 JAVA_OPTIONS+=("-Djetty.state=$JETTY_STATE")
9fba71
 rm -f $JETTY_STATE
9fba71
 
9fba71
+#####################################################
9fba71
+# Try to create work directory if not exists
9fba71
+#####################################################
9fba71
+if [ ! -d work ]; then
9fba71
+    (umask 022 && mkdir -p "$(readlink -f work)")
9fba71
+fi
9fba71
+
9fba71
 ##################################################
9fba71
 # Setup JAVA if unset
9fba71
 ##################################################
9fba71
-- 
9fba71
1.8.1.4
9fba71