source: trunk/debian/postinst @ 1484

Revision 1484, 1.3 KB checked in by anarcat, 8 years ago (diff)

arr�ter debconf manuellement car dopo le rend confus � cause de la sortie qu'il fait

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