| Revision 1473,
1.2 KB
checked in by anonymous, 9 years ago
(diff) |
|
suivre le nouveau chemin vers les configs auto-generees de webalizer
bugfix #288
|
-
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 || 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 | # Compile the po files : |
|---|
| 25 | /usr/share/alternc/install/dopo.sh |
|---|
| 26 | |
|---|
| 27 | # that's not very nice, but we need it |
|---|
| 28 | chown www-data /var/cache/alternc-webalizer |
|---|
| 29 | |
|---|
| 30 | # Finally, add this module to the AlternC's menu : |
|---|
| 31 | if [ -z `grep menu_stats.php /var/alternc/bureau/admin/menulist.txt` ] |
|---|
| 32 | then |
|---|
| 33 | echo "menu_stats.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 repository browser.