|
Revision 2177, 1.6 kB
(checked in by anarcat, 7 months ago)
|
correctly declare functions
I forgot to mention that the original patch here is from Patrick Hétu.
|
- 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 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
. /usr/share/debconf/confmodule |
|---|
| 7 |
|
|---|
| 8 |
. /etc/alternc/local.sh |
|---|
| 9 |
|
|---|
| 10 |
APACHEROTATE=/etc/logrotate.d/apache |
|---|
| 11 |
MENUFILE=/etc/alternc/menulist.txt |
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
logrotate_apache() { |
|---|
| 15 |
cp -a -f $APACHEROTATE $APACHEROTATE.tmp |
|---|
| 16 |
sed -e 's/create 640 root adm/create 640 root www-data/' < $APACHEROTATE > $APACHEROTATE.tmp |
|---|
| 17 |
mv -f $APACHEROTATE.tmp $APACHEROTATE |
|---|
| 18 |
} |
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
case "$1" in |
|---|
| 22 |
configure) |
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
mysql --defaults-file=/etc/alternc/my.cnf </usr/share/alternc/webalizer.sql || true |
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
db_get alternc-webalizer/default_quota_value || true |
|---|
| 29 |
/usr/lib/alternc/quota_init stats $RET |
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
db_stop |
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
/usr/share/alternc/install/dopo.sh |
|---|
| 36 |
|
|---|
| 37 |
chown www-data /var/cache/alternc-webalizer |
|---|
| 38 |
|
|---|
| 39 |
logrotate_apache |
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
if ! grep -q "^menu_webalizer.php$" "$MENUFILE"; then |
|---|
| 44 |
rm -f $MENUFILE.alternc_webalizer |
|---|
| 45 |
sed -e "s/menu_sta2.php/&\\ |
|---|
| 46 |
menu_webalizer.php/" <$MENUFILE >$MENUFILE.alternc_webalizer |
|---|
| 47 |
mv -f $MENUFILE.alternc_webalizer $MENUFILE |
|---|
| 48 |
fi |
|---|
| 49 |
|
|---|
| 50 |
;; |
|---|
| 51 |
|
|---|
| 52 |
abort-upgrade) |
|---|
| 53 |
exit 0 |
|---|
| 54 |
;; |
|---|
| 55 |
|
|---|
| 56 |
abort-remove|abort-deconfigure) |
|---|
| 57 |
exit 0 |
|---|
| 58 |
;; |
|---|
| 59 |
|
|---|
| 60 |
*) |
|---|
| 61 |
echo "postinst called with unknown argument '$1'" >&2 |
|---|
| 62 |
exit 1 |
|---|
| 63 |
;; |
|---|
| 64 |
esac |
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 |
exit 0 |
|---|