root/alternc-awstats/branches/r0/debian/postinst

Revision 1030, 1.2 kB (checked in by anonymous, 4 years ago)

Initial revision

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1 #!/bin/sh -e
2
3 # Debian alternc-awstats postinst
4 # Benjamin Sonntag <benjamin@alternc.org>
5
6 # Uses debconf
7 . /usr/share/debconf/confmodule
8 # Uses AlternC.conf
9 if [ -x /etc/alternc/local.sh ]
10 then
11     . /etc/alternc/local.sh
12 fi
13
14 case "$1" in
15 configure)
16
17     # 1st, configure the table if required
18     mysql -h"$MYSQL_HOST" -p"$MYSQL_PASS" -u"$MYSQL_USER" "$MYSQL_DATABASE" </usr/share/alternc/awstats.sql
19
20     # Then, configure the quota for "stats"
21     db_get alternc-awstats/quota_create_ask
22     /usr/share/alternc/quota_init aws $RET
23
24     # Compile the po files :
25     /usr/lib/alternc/dopo.sh
26
27     # that's not very nice, but we need it
28     chown www-data /etc/awstats
29
30     # Finally, add this module to the AlternC's menu :
31     if [ -z `grep menu_aws.php /var/alternc/bureau/admin/menulist.txt` ]
32     then
33         echo "menu_aws.php" >>/var/alternc/bureau/admin/menulist.txt
34     fi
35
36     ;;
37
38 abort-upgrade)
39     exit 0
40     ;;
41
42 abort-remove|abort-deconfigure)
43     exit 0
44     ;;
45
46 *)
47     echo "postinst called with unknown argument '$1'" >&2
48     exit 1
49     ;;
50 esac
51
52 # dh_installdeb will replace this with shell code automatically
53 # generated by other debhelper scripts.
54
55 #DEBHELPER#
56
57 exit 0
Note: See TracBrowser for help on using the browser.