/[pkg-sql-ledger]/ledger-smb/trunk/debian/ledgersmb.postinst
ViewVC logotype

Contents of /ledger-smb/trunk/debian/ledgersmb.postinst

Parent Directory Parent Directory | Revision Log Revision Log


Revision 427 - (hide annotations) (download)
Tue Feb 14 18:30:10 2012 UTC (16 months ago) by jame-guest
File size: 2153 byte(s)
Correct the whitespace indentation in the maintenance scripts.
1 jame-guest 267 #!/bin/sh
2     # postinst script for ledgersmb
3     #
4     # see: dh_installdeb(1)
5    
6     set -e
7    
8     # summary of how this script can be called:
9     # * <postinst> `configure' <most-recently-configured-version>
10     # * <old-postinst> `abort-upgrade' <new version>
11     # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
12     # <new-version>
13     # * <postinst> `abort-remove'
14     # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
15     # <failed-install-package> <version> `removing'
16     # <conflicting-package> <version>
17     # for details, see http://www.debian.org/doc/debian-policy/ or
18     # the debian-policy package
19    
20    
21     case "$1" in
22     configure)
23 jame-guest 404 # Do Apache related processing if it is present.
24     if [ -d "/etc/apache2" ]; then
25 jame-guest 427 # Only do these if this is the initial install.
26     if [ "$2" = "" ]; then
27     # Install ledgersmb-httpd.conf if a copy is not already installed.
28     if [ -d "/etc/apache2/conf.d" ]; then
29     if [ ! -e "/etc/apache2/conf.d/ledgersmb-httpd.conf" ]; then
30     cp /usr/share/doc/ledgersmb/examples/ledgersmb-httpd.conf.template /etc/apache2/conf.d/ledgersmb-httpd.conf
31     fi
32     fi
33     # Enable Apache mod_rewrite
34     if [ -x "`which a2enmod 2>/dev/null`" ]; then
35     a2enmod rewrite
36     fi
37     # Restart apache
38     if [ -x "/etc/init.d/apache2" ]; then
39     invoke-rc.d apache2 restart || true
40     fi
41 jame-guest 404 fi
42     fi
43 jame-guest 416 # Only do these if this is the initial install.
44     if [ "$2" = "" ]; then
45 jame-guest 427 # Install a default copy of pos.conf.pl using the example template file.
46     if [ ! -e "/usr/share/ledgersmb/pos.conf.pl" ]; then
47     cp /usr/share/doc/ledgersmb/examples/pos.conf.pl.template /usr/share/ledgersmb/pos.conf.pl
48     fi
49 jame-guest 416 fi
50 jame-guest 267 ;;
51    
52     abort-upgrade|abort-remove|abort-deconfigure)
53     ;;
54    
55     *)
56     echo "postinst called with unknown argument \`$1'" >&2
57     exit 1
58     ;;
59     esac
60    
61     # dh_installdeb will replace this with shell code automatically
62     # generated by other debhelper scripts.
63    
64     #DEBHELPER#
65    
66     exit 0

  ViewVC Help
Powered by ViewVC 1.1.5