~peter-pearse/ubuntu/natty/postgresql-8.4/prop001

« back to all changes in this revision

Viewing changes to debian/postgresql-8.4.init

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2010-07-19 23:29:03 UTC
  • Revision ID: james.westby@ubuntu.com-20100719232903-m2josk2ceepn2f4k
Tags: 8.4.4-2
* Migrate to a common init script for all server versions, to avoid
  providing the "postgresql" service in multiple packages (which causes
  insserv to complain bitterly):
  - Drop debian/postgresql-8.4.init.
  - debian/control: Bump dependency to postgresql-common to ensure we have a
    common /etc/init.d/postgresql init script.
  - debian/postgresql-8.4.preinst: Remove/rename our init script on upgrade.    
  - debian/postgresql-8.4.prerm: Call stop_version on upgrade.
  - debian/rules: Drop dh_installinit arguments.
  - (Closes: #585890)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh -e
2
 
 
3
 
### BEGIN INIT INFO
4
 
# Provides:             postgresql postgresql-8.4
5
 
# Required-Start:       $local_fs $remote_fs $network $time
6
 
# Required-Stop:        $local_fs $remote_fs $network $time
7
 
# Should-Start:         $syslog
8
 
# Should-Stop:          $syslog
9
 
# Default-Start:        2 3 4 5
10
 
# Default-Stop:         0 1 6
11
 
# Short-Description:    PostgreSQL 8.4 RDBMS server
12
 
### END INIT INFO
13
 
 
14
 
# Setting environment variables for the postmaster here does not work; please
15
 
# set them in /etc/postgresql/8.4/<cluster>/environment instead.
16
 
 
17
 
[ -r /usr/share/postgresql-common/init.d-functions ] || exit 0
18
 
 
19
 
. /usr/share/postgresql-common/init.d-functions
20
 
 
21
 
VERSION=8.4
22
 
 
23
 
case "$1" in
24
 
    start)
25
 
        start $VERSION
26
 
        ;;
27
 
    stop)
28
 
        stop "$VERSION"
29
 
        ;;
30
 
    restart)
31
 
        restart "$VERSION"
32
 
        ;;
33
 
    force-reload | reload)
34
 
        reload $VERSION
35
 
        ;;
36
 
    status)
37
 
        status $VERSION
38
 
        ;;
39
 
    *)
40
 
        echo "Usage: $0 {start|stop|restart|reload|force-reload|status|autovac-start|autovac-stop|autovac-restart}"
41
 
        exit 1
42
 
        ;;
43
 
esac
44
 
 
45
 
exit 0
46