~clint-fewbar/ubuntu/precise/gearmand/drop-unneeded-patches

« back to all changes in this revision

Viewing changes to support/gearmand.init

  • Committer: Package Import Robot
  • Author(s): Stig Sandbeck Mathisen, Michael Fladischer, Stig Sandbeck Mathisen
  • Date: 2012-01-23 11:31:08 UTC
  • mfrom: (6.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20120123113108-wl1yhiba13q9jusb
Tags: 0.27-1
[Michael Fladischer]
* Patch: fix spelling
* Patch: remove dependency on googleanalytics
* Patch: fix tests
* Use non-authenticating URL for Vcs-Git.
* Add "status" action to init script.

[Stig Sandbeck Mathisen]
* New upstream release (Closes: #621486) (LP: #682680)
* Remove build dependency on drizzle
  (until it reaches testing again)
* Build with support for tokyocabinet
* Remove backported ipv6 patch
* Patch: disable hostile build tests, they take hours...
* Patch: workaround duplicate address issue for tests
* Do not build API documentation, the sources are not shipped in
  upstream tarball
* Update debian/copyright

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
# gearmand        Startup script for the Gearman server
 
4
#
 
5
# chkconfig: - 85 15
 
6
# description: Gearman is a distributed job system.
 
7
# processname: gearmand
 
8
# config: /etc/sysconfig/gearmand
 
9
# pidfile: /var/run/gearmand/gearmand.pid
 
10
#
 
11
### BEGIN INIT INFO
 
12
# Provides: gearmand
 
13
# Required-Start: $local_fs $network
 
14
# Required-Stop: $local_fs $network
 
15
# Default-Start:
 
16
# Default-Stop:
 
17
# Short-Description: start and stop the Gearman server
 
18
# Description: Gearman is a distributed job system.
 
19
### END INIT INFO
 
20
 
 
21
# Source function library.
 
22
. /etc/rc.d/init.d/functions
 
23
 
 
24
if [ -f /etc/sysconfig/gearmand ]; then
 
25
        . /etc/sysconfig/gearmand
 
26
fi
 
27
 
 
28
[ -z "${PIDFILE}" ] && pidfile="/var/run/gearmand/gearmand.pid"
 
29
[ -z "${LOCKFILE}" ] && lockfile="/var/lock/subsys/gearmand"
 
30
 
 
31
gearmand=/usr/sbin/gearmand
 
32
prog=gearmand
 
33
 
 
34
RETVAL=0
 
35
 
 
36
start() {
 
37
        echo -n $"Starting $prog: "
 
38
        daemon --pidfile=$pidfile --user=gearmand $gearmand -d $OPTIONS
 
39
        RETVAL=$?
 
40
        echo
 
41
        [ $RETVAL = 0 ] && (touch $lockfile; pgrep -f $gearmand > $pidfile)
 
42
        return $RETVAL
 
43
}
 
44
 
 
45
stop() {
 
46
        echo -n $"Stopping $prog: "
 
47
        killproc -p $pidfile $gearmand
 
48
        RETVAL=$?
 
49
        echo
 
50
        [ $RETVAL = 0 ] && rm -f $lockfile $pidfile
 
51
}
 
52
 
 
53
# See how we were called.
 
54
case "$1" in
 
55
  start)
 
56
        start
 
57
        ;;
 
58
  stop)
 
59
        stop
 
60
        ;;
 
61
  status)
 
62
        status -p $pidfile $gearmand
 
63
        RETVAL=$?
 
64
        ;;
 
65
  restart|reload)
 
66
        stop
 
67
        start
 
68
        ;;
 
69
  condrestart|try-restart)
 
70
        if status -p $pidfile $gearmand >&/dev/null; then
 
71
                stop
 
72
                start
 
73
        fi
 
74
        ;;
 
75
  *)
 
76
        echo $"Usage: $prog {start|stop|restart|reload|condrestart|status|help}"
 
77
        RETVAL=3
 
78
esac
 
79
 
 
80
exit $RETVAL
 
81