[pkg-java] r12591 - trunk/jetty/debian
Niels Thykier
nthykier-guest at alioth.debian.org
Sun Jun 20 11:34:14 UTC 2010
Author: nthykier-guest
Date: 2010-06-20 11:34:12 +0000 (Sun, 20 Jun 2010)
New Revision: 12591
Modified:
trunk/jetty/debian/changelog
trunk/jetty/debian/jetty.init
Log:
Remove all use of sudo in jetty.init.
Modified: trunk/jetty/debian/changelog
===================================================================
--- trunk/jetty/debian/changelog 2010-06-20 10:31:07 UTC (rev 12590)
+++ trunk/jetty/debian/changelog 2010-06-20 11:34:12 UTC (rev 12591)
@@ -2,6 +2,7 @@
* Updated the versions in the Manifests to match the actual version
of jetty.
+ * Remove all use of sudo in jetty.init. (Closes: #580639)
-- Niels Thykier <niels at thykier.net> Sat, 19 Jun 2010 13:12:53 +0200
Modified: trunk/jetty/debian/jetty.init
===================================================================
--- trunk/jetty/debian/jetty.init 2010-06-20 10:31:07 UTC (rev 12590)
+++ trunk/jetty/debian/jetty.init 2010-06-20 11:34:12 UTC (rev 12591)
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+6#!/bin/sh -e
#
# /etc/init.d/jetty -- startup script for jetty 6.1.18
#
@@ -43,10 +43,6 @@
# JAVA_HOME
# Home of Java installation.
#
-# JAVA
-# Command to invoke Java. If not set, $JAVA_HOME/bin/java will be
-# used.
-#
# JAVA_OPTIONS
# Extra options to pass to the JVM
#
@@ -267,19 +263,17 @@
if start-stop-daemon --quiet --test --start --pidfile "$PIDFILE" \
--user "$JETTY_USER" --startas "$JAVA" > /dev/null; then
- if [ -f $PIDFILE ]
- then
+ if [ -f $PIDFILE ] ; then
log_warning_msg "$PIDFILE exists, but jetty was not running. Ignoring $PIDFILE"
- fi
+ fi
- if [ \! -e "$LOGDIR/out.log" ]; then
- log_progress_msg "Create log file"
- sudo -u $JETTY_USER touch "$LOGDIR/out.log"
- chown $JETTY_USER:adm "$LOGDIR/out.log"
+ if [ -s "$LOGDIR/out.log" ]; then
+ log_progress_msg "Rotate logs"
+ $ROTATELOGS "$LOGDIR/out.log" 86400 \
+ < "$LOGDIR/out.log"
fi
- log_progress_msg "Rotate logs"
- sudo -b -u $JETTY_USER $ROTATELOGS "$LOGDIR/out.log" 86400 \
- < "$LOGDIR/out.log"
+ > "$LOGDIR/out.log"
+ chown -R $JETTY_USER:adm "$LOGDIR"
# Remove / recreate JETTY_TMP directory
rm -rf "$JETTY_TMP"
More information about the pkg-java-commits
mailing list