Move the Jetty 6.x start script to our extra directory
Unpacking the script from our WAR is easier than copying and pasting from the documentation. We also need a different file for Jetty 7.x. Change-Id: I73b558bdc8f5e1fd4889eaa0ce06bf49cc660448 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -263,27 +263,12 @@ Add the following to `'$JETTY_HOME'/etc/jetty.xml` under
|
||||
<Set name="headerBufferSize">16384</Set>
|
||||
====
|
||||
|
||||
To start automatically when the system boots, consider a start
|
||||
script such as the following in `/etc/init.d/gerrit2-jetty`
|
||||
To start automatically when the system boots, create a start
|
||||
script and modify it for your configuration:
|
||||
|
||||
====
|
||||
#!/bin/sh
|
||||
|
||||
export JETTY_HOST=127.0.0.1
|
||||
export JETTY_PORT=8081
|
||||
export JETTY_USER=gerrit2
|
||||
export JETTY_PID=/var/run/jetty$JETTY_PORT.pid
|
||||
export JETTY_HOME=/home/$JETTY_USER/jetty
|
||||
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.07/jre
|
||||
|
||||
JAVA_OPTIONS=""
|
||||
JAVA_OPTIONS="$JAVA_OPTIONS -Djetty.host=$JETTY_HOST"
|
||||
export JAVA_OPTIONS
|
||||
|
||||
C="jetty-logging jetty"
|
||||
[ -f "$JETTY_HOME/etc/jetty_sslproxy.xml" ] && C="$C jetty_sslproxy"
|
||||
|
||||
exec $JETTY_HOME/bin/jetty.sh "$@" $C
|
||||
java -jar gerrit.war --cat extra/jetty6/gerrit-jetty.sh >/etc/init.d/gerrit-jetty.sh
|
||||
vi /etc/init.d/gerrit-jetty.sh
|
||||
====
|
||||
|
||||
[TIP]
|
||||
|
||||
17
src/main/webapp/WEB-INF/extra/jetty6/gerrit-jetty.sh
Normal file
17
src/main/webapp/WEB-INF/extra/jetty6/gerrit-jetty.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
export JETTY_HOST=127.0.0.1
|
||||
export JETTY_PORT=8081
|
||||
export JETTY_USER=gerrit2
|
||||
export JETTY_PID=/var/run/jetty$JETTY_PORT.pid
|
||||
export JETTY_HOME=/home/$JETTY_USER/jetty
|
||||
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.07/jre
|
||||
|
||||
JAVA_OPTIONS=""
|
||||
JAVA_OPTIONS="$JAVA_OPTIONS -Djetty.host=$JETTY_HOST"
|
||||
export JAVA_OPTIONS
|
||||
|
||||
C="jetty-logging jetty"
|
||||
[ -f "$JETTY_HOME/etc/jetty_sslproxy.xml" ] && C="$C jetty_sslproxy"
|
||||
|
||||
exec $JETTY_HOME/bin/jetty.sh "$@" $C
|
||||
Reference in New Issue
Block a user