| Revision 1517,
1.6 KB
checked in by benjamin, 7 years ago
(diff) |
|
erreur de syntaxe postinst
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
-
Property svn:keywords set to
Author Date Id Revision
|
| Rev | Line | |
|---|
| [1446] | 1 | #!/bin/sh -e |
|---|
| 2 | |
|---|
| 3 | # Debian alternc-webalizer postinst |
|---|
| 4 | |
|---|
| 5 | # Uses debconf |
|---|
| 6 | . /usr/share/debconf/confmodule |
|---|
| 7 | # Uses AlternC.conf |
|---|
| [1512] | 8 | . /etc/alternc/local.sh |
|---|
| [1446] | 9 | |
|---|
| [1513] | 10 | # Configure logrotate.d/apache to create log owned by group www-data : |
|---|
| 11 | function logrotate_apache { |
|---|
| 12 | cp -a -f $APACHEROTATE $APACHEROTATE.tmp |
|---|
| 13 | sed -e 's/create 640 root adm/create 640 root www-data/' < $APACHEROTATE > $APACHEROTATE.tmp |
|---|
| 14 | mv -f $APACHEROTATE.tmp $APACHEROTATE |
|---|
| 15 | } |
|---|
| 16 | |
|---|
| 17 | |
|---|
| [1446] | 18 | case "$1" in |
|---|
| 19 | configure) |
|---|
| 20 | |
|---|
| 21 | # 1st, configure the table if required |
|---|
| [1470] | 22 | mysql -h"$MYSQL_HOST" -p"$MYSQL_PASS" -u"$MYSQL_USER" "$MYSQL_DATABASE" </usr/share/alternc/webalizer.sql || true |
|---|
| [1446] | 23 | |
|---|
| 24 | # Then, configure the quota for "stats" |
|---|
| [1471] | 25 | db_get alternc-webalizer/default_quota_value || true |
|---|
| [1470] | 26 | /usr/lib/alternc/quota_init stats $RET |
|---|
| [1454] | 27 | |
|---|
| [1484] | 28 | # stop debconf so the output of dopo doesn't screw up something |
|---|
| 29 | db_stop |
|---|
| 30 | |
|---|
| [1454] | 31 | # Compile the po files : |
|---|
| [1471] | 32 | /usr/share/alternc/install/dopo.sh |
|---|
| [1460] | 33 | |
|---|
| [1473] | 34 | chown www-data /var/cache/alternc-webalizer |
|---|
| [1513] | 35 | |
|---|
| 36 | logrotate_apache |
|---|
| [1460] | 37 | |
|---|
| [1517] | 38 | # ADD menu item : |
|---|
| 39 | |
|---|
| [1512] | 40 | if ! grep -q "^menu_webalizer.php$" "$MENUFILE"; then |
|---|
| 41 | rm -f $MENUFILE.alternc_webalizer |
|---|
| 42 | sed -e "s/menu_brouteur.php/&\\ |
|---|
| 43 | menu_webalizer.php/" <$MENUFILE >$MENUFILE.alternc_webalizer |
|---|
| 44 | mv -f $MENUFILE.alternc_webalizer $MENUFILE |
|---|
| [1446] | 45 | fi |
|---|
| 46 | |
|---|
| 47 | ;; |
|---|
| 48 | |
|---|
| 49 | abort-upgrade) |
|---|
| 50 | exit 0 |
|---|
| 51 | ;; |
|---|
| 52 | |
|---|
| 53 | abort-remove|abort-deconfigure) |
|---|
| 54 | exit 0 |
|---|
| 55 | ;; |
|---|
| 56 | |
|---|
| 57 | *) |
|---|
| [1447] | 58 | echo "postinst called with unknown argument '$1'" >&2 |
|---|
| [1446] | 59 | exit 1 |
|---|
| 60 | ;; |
|---|
| 61 | esac |
|---|
| 62 | |
|---|
| [1460] | 63 | # dh_installdeb will replace this with shell code automatically |
|---|
| 64 | # generated by other debhelper scripts. |
|---|
| 65 | |
|---|
| 66 | #DEBHELPER# |
|---|
| 67 | |
|---|
| [1446] | 68 | exit 0 |
|---|
Note: See
TracBrowser
for help on using the repository browser.