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