~ubuntu-branches/ubuntu/trusty/jenkins/trusty

« back to all changes in this revision

Viewing changes to debian/jenkins.init

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-08-13 12:35:19 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20130813123519-tizgfxcr70trl7r0
Tags: 1.509.2+dfsg-1
* New upstream release (Closes: #706725):
  - d/control: Update versioned BD's:
    * jenkins-executable-war >= 1.28.
    * jenkins-instance-identity >= 1.3.
    * libjenkins-remoting-java >= 2.23.
    * libjenkins-winstone-java >= 0.9.10-jenkins-44.
    * libstapler-java >= 1.207.
    * libjenkins-json-java >= 2.4-jenkins-1.
    * libstapler-adjunct-timeline-java >= 1.4.
    * libstapler-adjunct-codemirror-java >= 1.2.
    * libmaven-hpi-plugin-java >= 1.93.
    * libjenkins-xstream-java >= 1.4.4-jenkins-3.
  - d/maven.rules: Map to older version of animal-sniffer-maven-plugin.
  - Add patch for compatibility with guava >= 0.14.
  - Add patch to exclude asm4 dependency via jnr-posix.
  - Fixes the following security vulnerabilities:
    CVE-2013-2034, CVE-2013-2033, CVE-2013-2034, CVE-2013-1808
* d/patches/*: Switch to using git patch-queue for managing patches.
* De-duplicate jars between libjenkins-java and jenkins-external-job-monitor
  (Closes: #701163):
  - d/control: Add dependency between jenkins-external-job-monitor ->
    libjenkins-java.
  - d/rules: 
    Drop installation of jenkins-core in jenkins-external-job-monitor.
  - d/jenkins-external-job-monitor.{links,install}: Link to jenkins-core
    in /usr/share/java instead of included version.
* Wait longer for jenkins to stop during restarts (Closes: #704848):
  - d/jenkins.init: Re-sync init script from upstream codebase.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
SU=/bin/su
29
29
 
30
30
# Exit if the package is not installed
31
 
[ -x "$DAEMON" ] || exit 0
 
31
[ -x "$DAEMON" ] || (echo "daemon package not installed" && exit 0)
32
32
 
33
33
# Exit if not supposed to run standalone
34
 
[ "$RUN_STANDALONE" = "false" ] && exit 0
 
34
[ "$RUN_STANDALONE" = "false" ] && echo "Not configured to run standalone" && exit 0
35
35
 
36
36
# load environments
37
37
if [ -r /etc/default/locale ]; then
42
42
  export LANG LANGUAGE
43
43
fi
44
44
 
45
 
VERBOSE=no
46
 
 
47
45
# Define LSB log_* functions.
48
46
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
49
47
. /lib/lsb/init-functions
146
144
        0) 
147
145
            $DAEMON $DAEMON_ARGS --stop || return 2
148
146
        # wait for the process to really terminate
149
 
        for n in 1 2 3 4 5; do
 
147
        for n in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
150
148
            sleep 1
151
149
            $DAEMON $DAEMON_ARGS --running || break
152
150
        done
204
202
    esac
205
203
    ;;
206
204
  status)
207
 
      get_daemon_status
208
 
      case "$?" in 
209
 
         0) echo "$DESC is running with the pid `cat $PIDFILE`";;
210
 
         *) 
211
 
              get_running
212
 
              procs=$?
213
 
              if [ $procs -eq 0 ]; then 
214
 
                  echo -n "$DESC is not running"
215
 
                  if [ -f $PIDFILE ]; then 
216
 
                      echo ", but the pidfile ($PIDFILE) still exists"
217
 
                  else 
218
 
                      echo
219
 
                  fi
220
 
 
221
 
              else 
222
 
                  echo "$procs instances of jenkins are running at the moment"
223
 
                  echo "but the pidfile $PIDFILE is missing"
224
 
              fi
225
 
              ;;
226
 
      esac
227
 
    ;;
 
205
        get_daemon_status
 
206
        case "$?" in 
 
207
         0) 
 
208
                echo "$DESC is running with the pid `cat $PIDFILE`"
 
209
                rc=0
 
210
                ;;
 
211
        *) 
 
212
                get_running
 
213
                procs=$?
 
214
                if [ $procs -eq 0 ]; then 
 
215
                        echo -n "$DESC is not running"
 
216
                        if [ -f $PIDFILE ]; then 
 
217
                                echo ", but the pidfile ($PIDFILE) still exists"
 
218
                                rc=1
 
219
                        else 
 
220
                                echo
 
221
                                rc=3
 
222
                        fi
 
223
                
 
224
                else 
 
225
                        echo "$procs instances of jenkins are running at the moment"
 
226
                        echo "but the pidfile $PIDFILE is missing"
 
227
                        rc=0
 
228
                fi
 
229
                
 
230
                exit $rc
 
231
                ;;
 
232
        esac
 
233
        ;;
228
234
  *)
229
235
    echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
230
236
    exit 3