~ubuntu-branches/ubuntu/quantal/nginx/quantal-updates

« back to all changes in this revision

Viewing changes to debian/postinst

  • Committer: Bazaar Package Importer
  • Author(s): Michael Lustfield, Micheal Lustfield, Kartik Mistry
  • Date: 2011-03-03 23:39:07 UTC
  • mfrom: (4.2.29 sid)
  • Revision ID: james.westby@ubuntu.com-20110303233907-y48yifhfnn5qjuxz
Tags: 0.8.54-4
[Micheal Lustfield]
* debian/nginx-{full,light,extras}.default:
  + Added comment about alternative to ULIMIT.
* debian/nginx-{full,light,extras}.init.d:
  + Added quotes around a test variable. (Closes: #610946, LP: #699736)
* debian/patches/609343-log-time-iso8601.diff:
  + Added patch to add $time_iso8601 variable to logs. (Closes: #609343)
* Clean up old logrotate files. (Closes: #608983, Closes: #610289)
  + Added Files:
    - debian/nginx-common.preinst
  + Modified Files:
    - debian/rules
  + Moved debian/nginx-common.logrotate to debian/logrotate.
* Added common files to nginx-common package. (Closes: #610290)
  + Removed Files:
    - debian/nginx-full.dirs
    - debian/nginx-light.dirs
    - debian/nginx-full.install
    - debian/nginx-light.install
    - debian/nginx-extras.install
    - debian/nginx.*
  + Added Files:
    - debian/nginx-common.default
    - debian/nginx-common.dirs
    - debian/nginx-common.init.d
    - debian/nginx-common.install
    - debian/nginx-common.manpages
    - debian/logrotate
  + Modified Files:
    - debian/nginx-extras.dirs
    - debian/control
    - debian/rules
* debian/nginx-*.install: (Closes: #609797)
  + Removed NEWS.Debian from nginx-{full,light,extras}.install.
  + Added NEWS.Debian to nginx-common.install.
* nginx-common.postinst:
  + Enforce /var/log/nginx mode and user:group. (Closes: #610983)
  + Enforce /var/log/nginx/*.log mode and user:group. (Closes: #612832)
* debian/rules:
  + Added --with-file-aio to nginx-extras. (Closes: #613175)
  + Removed split clients and user id modules from nginx-light.
* debian/conf/sites-available/default:
  + Fixed a minor typo ( s/Quickstart/QuickStart/ ). (Closes: #613355)
* debian/conf/mime.types:
  + Changed xml type to application/xhtml+xml. (Closes: #613851)
* debian/help/docs/fcgiwrap:
  + Removed Ubuntu specific line in docs. (Closes: #614987)
* debian/conf/sites-available/default:
  + Fixed a pointer to a file. (Closes: #614980)

[Kartik Mistry]
* debian/*.lintian-overrides:
  + Add Lintian overrides for nginx man page. We've manpage in nginx-common
    binary

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
set -e
4
 
 
5
 
case "$1" in
6
 
  configure)
7
 
    if [ -z $2 ] && [ ! -e /etc/nginx/sites-enabled/default ] ; 
8
 
    then
9
 
      ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
10
 
    fi
11
 
    ;;
12
 
  abort-upgrade|abort-remove|abort-deconfigure)
13
 
    ;;
14
 
  *)
15
 
    echo "postinst called with unknown argument \`$1'" >&2
16
 
    exit 1
17
 
    ;;
18
 
esac
19
 
 
20
 
if [ -x /etc/init.d/nginx ]
21
 
then
22
 
  if [ -f /var/run/nginx.pid ] && pidof /usr/sbin/nginx >/dev/null
23
 
  then
24
 
    echo "Trying a soft restart"
25
 
    NGX_PID=`cat /var/run/nginx.pid`
26
 
    if kill -s USR2 $NGX_PID 2>/dev/null
27
 
    then
28
 
      echo "PID IS RIGHT"
29
 
      while [ ! -f /var/run/nginx.pid.oldbin ]
30
 
      do
31
 
        echo "WAITING"
32
 
        cnt=`expr $cnt + 1`
33
 
        if [ $cnt -gt 10 ]
34
 
        then
35
 
          echo "Nginx 'soft' update failed, doing restart"
36
 
          kill -s KILL $NGX_PID
37
 
          invoke-rc.d nginx start
38
 
          exit 0
39
 
        fi
40
 
        sleep 1
41
 
      done
42
 
      echo "QUIT"
43
 
      NGX_OLD_PID=`cat /var/run/nginx.pid.oldbin`
44
 
      kill -s QUIT $NGX_OLD_PID
45
 
    fi
46
 
  fi
47
 
fi
48
 
 
49
 
#DEBHELPER#
50
 
 
51
 
exit 0