~clint-fewbar/ubuntu/precise/php5/php5-5.4-merge

« back to all changes in this revision

Viewing changes to debian/php5-fpm.init

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-02-22 09:46:37 UTC
  • mfrom: (1.1.20) (0.3.18 sid)
  • Revision ID: package-import@ubuntu.com-20110222094637-nlu2tvb7oqgaarl0
Tags: 5.3.5-1ubuntu1
* Merge from debian/unstable. Remaining changes:
 - debian/control:
    * Dropped firebird2.1-dev, libc-client-dev, libmcrypt-dev as it is in universe.
    * Dropped libmysqlclient15-dev, build against mysql 5.1.
    * Dropped libcurl-dev not in the archive.
    * Suggest php5-suhosin rather than recommends.
    * Dropped php5-imap, php5-interbase, php5-mcrypt since we have versions 
      already in universe.
    * Dropped libonig-dev and libqgdbm since its in universe. (will be re-added in lucid+1)
    * Dropped locales-all.
  - modulelist: Drop imap, interbase, sybase, and mcrypt.
  - debian/rules:
    * Dropped building of mcrypt, imap, and interbase.
    * Install apport hook for php5.
    * stop mysql instance on clean just in case we failed in tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
### BEGIN INIT INFO
 
4
# Provides:          php-fpm php5-fpm
 
5
# Required-Start:    $remote_fs $network
 
6
# Required-Stop:     $remote_fs $network
 
7
# Default-Start:     2 3 4 5
 
8
# Default-Stop:
 
9
# Short-Description: starts php-fpm
 
10
### END INIT INFO
 
11
 
 
12
set -u
 
13
 
 
14
DAEMON="PHP5 FPM"
 
15
FPM_CMD=/usr/sbin/php5-fpm
 
16
FPM_CONF=/etc/php5/fpm/main.conf
 
17
FPM_PID=/var/run/php5-fpm.pid
 
18
TIMEOUT=30
 
19
 
 
20
FPM_OPTIONS="--fpm-config $FPM_CONF"
 
21
SSD_OPTIONS="--oknodo --quiet --pidfile $FPM_PID --exec $FPM_CMD"
 
22
 
 
23
. /lib/lsb/init-functions
 
24
 
 
25
case "$1" in
 
26
    start)
 
27
        log_begin_msg "Starting $DAEMON..."
 
28
 
 
29
        /sbin/start-stop-daemon --start $SSD_OPTIONS -- $FPM_OPTIONS
 
30
        log_end_msg $?
 
31
    ;;
 
32
    stop)
 
33
        log_begin_msg "Stopping $DAEMON..."
 
34
 
 
35
        /sbin/start-stop-daemon --stop $SSD_OPTIONS
 
36
        log_end_msg $?
 
37
    ;;
 
38
    graceful-stop)
 
39
        log_begin_msg "Gracefully stopping $DAEMON..."
 
40
 
 
41
        /sbin/start-stop-daemon --stop --retry QUIT/$TIMEOUT/TERM $SSD_OPTIONS
 
42
        log_end_msg $?
 
43
    ;;
 
44
    restart)
 
45
        $0 stop
 
46
        $0 start
 
47
    ;;
 
48
    reload|force-reload)
 
49
        log_begin_msg "Reloading $DAEMON..."
 
50
 
 
51
        /sbin/start-stop-daemon --stop --signal USR2 $SSD_OPTIONS
 
52
        log_end_msg $?
 
53
    ;;
 
54
    *)
 
55
        echo "Usage: $0 {start|stop|graceful-stop|restart|reload|force-reload}"
 
56
        exit 1
 
57
    ;;
 
58
esac