| Revision 1455,
1007 bytes
checked in by anonymous, 9 years ago
(diff) |
|
typo
|
-
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 | 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/webalizer.sql |
|---|
| 19 | |
|---|
| 20 | # Then, configure the quota for "stats" |
|---|
| 21 | db_get alternc-webalizer/quota_create_ask |
|---|
| 22 | /usr/share/alternc/quota_init stats $RET |
|---|
| 23 | |
|---|
| 24 | # Compile the po files : |
|---|
| 25 | /usr/lib/alternc/dopo.sh |
|---|
| 26 | |
|---|
| 27 | # Finally, add this module to the AlternC's menu : |
|---|
| 28 | if [ -z `grep menu_stats.php /var/alternc/bureau/admin/menulist.txt` ] |
|---|
| 29 | then |
|---|
| 30 | echo "menu_stats.php" >>/var/alternc/bureau/admin/menulist.txt |
|---|
| 31 | fi |
|---|
| 32 | |
|---|
| 33 | ;; |
|---|
| 34 | |
|---|
| 35 | abort-upgrade) |
|---|
| 36 | exit 0 |
|---|
| 37 | ;; |
|---|
| 38 | |
|---|
| 39 | abort-remove|abort-deconfigure) |
|---|
| 40 | exit 0 |
|---|
| 41 | ;; |
|---|
| 42 | |
|---|
| 43 | *) |
|---|
| 44 | echo "postinst called with unknown argument '$1'" >&2 |
|---|
| 45 | exit 1 |
|---|
| 46 | ;; |
|---|
| 47 | esac |
|---|
| 48 | |
|---|
| 49 | exit 0 |
|---|
Note: See
TracBrowser
for help on using the repository browser.