Author: vmassol
Date: 2007-09-04 14:32:09 +0200 (Tue, 04 Sep 2007)
New Revision: 4709
Modified:
xwiki-platform/xwiki-tools/trunk/xwiki-jetty-resources/src/main/resources/start_xwiki.sh
xwiki-platform/xwiki-tools/trunk/xwiki-jetty-resources/src/main/resources/start_xwiki_debug.sh
xwiki-platform/xwiki-tools/trunk/xwiki-jetty-resources/src/main/resources/stop_xwiki.sh
Log:
XTOOLS-9: Allow starting XWiki Enterprise standalone from any directory
Modified:
xwiki-platform/xwiki-tools/trunk/xwiki-jetty-resources/src/main/resources/start_xwiki.sh
===================================================================
---
xwiki-platform/xwiki-tools/trunk/xwiki-jetty-resources/src/main/resources/start_xwiki.sh
2007-09-04 10:28:31 UTC (rev 4708)
+++
xwiki-platform/xwiki-tools/trunk/xwiki-jetty-resources/src/main/resources/start_xwiki.sh
2007-09-04 12:32:09 UTC (rev 4709)
@@ -1,5 +1,21 @@
#!/bin/sh
+# Ensure that the commands below are always started in the directory where
this script is
+# located. To do this we compute the location of the current script.
+
+PRG="$0"
+while [ -h "$PRG" ]; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`/"$link"
+ fi
+done
+PRGDIR=`dirname "$PRG"`
+cd "$PRGDIR"
+
JETTY_HOME=.
JAVA_OPTS=-Xmx300m
@@ -11,7 +27,7 @@
fi
echo Starting Jetty on port $JETTY_PORT ...
-echo Logs are in the xwiki.log file in the current directory
+echo Logs are in the $PRGDIR/xwiki.log file
mkdir -p logs 2>/dev/null
LANG=fr_FR.ISO8859-1 java $JAVA_OPTS -Dfile.encoding=iso-8859-1
-Djetty.port=$JETTY_PORT -Djetty.home=$JETTY_HOME -jar $JETTY_HOME/start.jar
Modified:
xwiki-platform/xwiki-tools/trunk/xwiki-jetty-resources/src/main/resources/start_xwiki_debug.sh
===================================================================
---
xwiki-platform/xwiki-tools/trunk/xwiki-jetty-resources/src/main/resources/start_xwiki_debug.sh
2007-09-04 10:28:31 UTC (rev 4708)
+++
xwiki-platform/xwiki-tools/trunk/xwiki-jetty-resources/src/main/resources/start_xwiki_debug.sh
2007-09-04 12:32:09 UTC (rev 4709)
@@ -1,5 +1,21 @@
#!/bin/sh
+# Ensure that the commands below are always started in the directory where
this script is
+# located. To do this we compute the location of the current script.
+
+PRG="$0"
+while [ -h "$PRG" ]; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`/"$link"
+ fi
+done
+PRGDIR=`dirname "$PRG"`
+cd "$PRGDIR"
+
JETTY_HOME=.
JAVA_OPTS="-Xmx300m -Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
@@ -14,5 +30,8 @@
JETTY_PORT=8080
fi
+echo Starting Jetty on port $JETTY_PORT ...
+echo Logs are in the $PRGDIR/xwiki.log file
+
mkdir -p logs 2>/dev/null
LANG=fr_FR.ISO8859-1 java $JAVA_OPTS -Dfile.encoding=iso-8859-1
-Djetty.port=$JETTY_PORT -Djetty.home=$JETTY_HOME -jar $JETTY_HOME/start.jar
Modified:
xwiki-platform/xwiki-tools/trunk/xwiki-jetty-resources/src/main/resources/stop_xwiki.sh
===================================================================
---
xwiki-platform/xwiki-tools/trunk/xwiki-jetty-resources/src/main/resources/stop_xwiki.sh
2007-09-04 10:28:31 UTC (rev 4708)
+++
xwiki-platform/xwiki-tools/trunk/xwiki-jetty-resources/src/main/resources/stop_xwiki.sh
2007-09-04 12:32:09 UTC (rev 4709)
@@ -1,6 +1,21 @@
#!/bin/sh
+# Ensure that the commands below are always started in the directory where
this script is
+# located. To do this we compute the location of the current script.
+PRG="$0"
+while [ -h "$PRG" ]; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`/"$link"
+ fi
+done
+PRGDIR=`dirname "$PRG"`
+cd "$PRGDIR"
+
JETTY_HOME=.
java -jar $JETTY_HOME/stop.jar
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications