[jetty8] 08/09: Added a VERSION variable in jetty8.init and replaced 'jetty8' with 'jetty$VERSION'

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed Dec 2 12:28:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository jetty8.

commit 3e85884c0641e309e70241460ea681d0d6cc7871
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Wed Dec 2 12:21:51 2015 +0100

    Added a VERSION variable in jetty8.init and replaced 'jetty8' with 'jetty$VERSION'
---
 debian/changelog   |  2 ++
 debian/jetty8.init | 19 ++++++++++---------
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 49c36ea..ff5a949 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ jetty8 (8.1.18-3) UNRELEASED; urgency=medium
   * Invoke Jetty with 'java -jar start.jar' instead of
     'java -cp start.jar org.eclipse.jetty.start.Main'
   * Removed the JDK_DIRS and JSP_COMPILER variables from /etc/default/jetty8
+  * Added a VERSION variable in jetty8.init and replaced 'jetty8'
+    with 'jetty$VERSION'
 
  -- Emmanuel Bourg <ebourg at apache.org>  Wed, 02 Dec 2015 10:05:19 +0100
 
diff --git a/debian/jetty8.init b/debian/jetty8.init
index 331c507..36a5d57 100644
--- a/debian/jetty8.init
+++ b/debian/jetty8.init
@@ -63,7 +63,8 @@
 #   if set, then used as a username to run the server as
 
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-NAME=jetty8
+VERSION=8
+NAME=jetty$VERSION
 DESC="Jetty servlet engine"
 JETTY_HOME=/usr/share/$NAME
 LOGDIR="/var/log/$NAME"
@@ -108,7 +109,7 @@ JETTY_PORT=8080
 # Additional arguments to pass to Jetty
 JETTY_ARGS=
 
-JETTY_STATE=/var/lib/jetty8/jetty.state
+JETTY_STATE=/var/lib/jetty$VERSION/jetty.state
 
 # Extra options to pass to the JVM
 # Set java.awt.headless=true if JAVA_OPTIONS is not set so the
@@ -146,10 +147,10 @@ find_jdks
 JETTY_SHUTDOWN=30
 
 # Jetty uses a directory to store temporary files like unpacked webapps
-JETTY_TMP=/var/cache/jetty8/data
+JETTY_TMP=/var/cache/jetty$VERSION/data
 
 # Jetty uses a config file to setup its boot classpath
-JETTY_START_CONFIG=/etc/jetty8/start.config
+JETTY_START_CONFIG=/etc/jetty$VERSION/start.config
 
 # End of variables that can be overwritten in /etc/default/jetty
 
@@ -167,13 +168,13 @@ fi
 
 # Check whether startup has been disabled
 if [ "$NO_START" != "0" -a "$1" != "stop" ]; then
-	[ "$VERBOSE" != "no" ] && log_failure_msg "Not starting jetty - edit /etc/default/jetty8 and change NO_START to be 0 (or comment it out)."
+	[ "$VERBOSE" != "no" ] && log_failure_msg "Not starting jetty - edit /etc/default/jetty$VERSION and change NO_START to be 0 (or comment it out)."
 	exit 0
 fi
 
 if [ -z "$JETTY_USER" ]; then
 	log_failure_msg "Not starting/stopping $DESC as configured"
-	log_failure_msg "(JETTY_USER is empty in /etc/default/jetty8)."
+	log_failure_msg "(JETTY_USER is empty in /etc/default/jetty$VERSION)."
 	exit 0
 fi
 
@@ -211,11 +212,11 @@ HOSTNAME=$(uname -n)
 if [ -z "$JAVA_HOME" ]; then
 	log_failure_msg "Could not start $DESC because no Java Runtime Environment (JRE)"
 	log_failure_msg "was found. Please download and install Java 6 or higher and set"
-	log_failure_msg "JAVA_HOME in /etc/default/jetty8 to the JDK's installation directory."
+	log_failure_msg "JAVA_HOME in /etc/default/jetty$VERSION to the JDK's installation directory."
 	exit 0
 fi
 
-JETTY_CONF=/etc/jetty8/jetty.conf
+JETTY_CONF=/etc/jetty$VERSION/jetty.conf
 CONFIG_LINES=$(cat $JETTY_CONF | grep -v "^[[:space:]]*#" | tr "\n" " ")
 
 ##################################################
@@ -258,7 +259,7 @@ fi
 #####################################################
 if [ -z "$CONFIGS" ]
 then
-	CONFIGS="/etc/jetty8/jetty-logging.xml /etc/jetty8/jetty-started.xml"
+	CONFIGS="/etc/jetty$VERSION/jetty-logging.xml /etc/jetty$VERSION/jetty-started.xml"
 fi
 
 ##################################################

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jetty8.git



More information about the pkg-java-commits mailing list