source: trunk/debian/postinst @ 1447

Revision 1447, 897 bytes checked in by benjamin, 9 years ago (diff)

divers modif pour lintian

  • 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
9. /usr/alternc/local.sh
10
11case "$1" in
12configure)
13
14    # 1st, configure the table if required
15    mysql -h"$MYSQL_HOST" -p"$MYSQL_PASS" -u"$MYSQL_USER" "$MYSQL_DATABASE" </usr/share/alternc/webalizer.sql
16
17    # Then, configure the quota for "stats"
18    db_get alternc-webalizer/quota_create_ask
19    /usr/share/alternc/quota_init stats $RES
20   
21    # Finally, add this module to the AlternC's menu :
22    if [ -z `grep menu_stats.php /var/alternc/bureau/admin/menulist.txt` ] then
23        echo "menu_stats.php" >>/var/alternc/bureau/admin/menulist.txt
24    fi
25
26    ;;
27
28abort-upgrade)
29    exit 0
30    ;;
31
32abort-remove|abort-deconfigure)
33    exit 0
34    ;;
35
36*)
37    echo "postinst called with unknown argument '$1'" >&2
38    exit 1
39    ;;
40esac
41
42exit 0
Note: See TracBrowser for help on using the repository browser.