|
Revision 1070, 2.1 kB
(checked in by anarcat, 3 years ago)
|
try to make this installable, by fixing the following error:
chown: cannot access `/var/cache/awstats': No such file or directory
|
- 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 |
|
|---|
| 7 |
|
|---|
| 8 |
function configure { |
|---|
| 9 |
if grep -vqs "\*\*\*AWSTATS\*\*\*" $1 |
|---|
| 10 |
then |
|---|
| 11 |
|
|---|
| 12 |
rm -f $1.alternc_awstats |
|---|
| 13 |
sed -e "s/\*\*\*ALTERNC_ALIASES\*\*\*/&\\ |
|---|
| 14 |
# ***AWSTATS*** \\ |
|---|
| 15 |
Include \"\/etc\/apache\/alternc-awstats.conf\"/" <$1 >$1.alternc_awstats |
|---|
| 16 |
mv -f $1.alternc_awstats $1 |
|---|
| 17 |
fi |
|---|
| 18 |
} |
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
. /usr/share/debconf/confmodule |
|---|
| 23 |
|
|---|
| 24 |
if [ -e /etc/alternc/local.sh ] |
|---|
| 25 |
then |
|---|
| 26 |
. /etc/alternc/local.sh |
|---|
| 27 |
fi |
|---|
| 28 |
|
|---|
| 29 |
case "$1" in |
|---|
| 30 |
configure) |
|---|
| 31 |
|
|---|
| 32 |
if [ -z "$MYSQL_HOST" ] |
|---|
| 33 |
then |
|---|
| 34 |
MYSQL_HOST="localhost" |
|---|
| 35 |
fi |
|---|
| 36 |
|
|---|
| 37 |
mysql -h"$MYSQL_HOST" -p"$MYSQL_PASS" -u"$MYSQL_USER" "$MYSQL_DATABASE" </usr/share/alternc/awstats.sql || true |
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
RET="2" |
|---|
| 41 |
db_get alternc-awstats/default_quota_value |
|---|
| 42 |
/usr/lib/alternc/quota_init aws $RET |
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
echo "Configuring apache" |
|---|
| 46 |
configure /etc/apache/httpd.conf |
|---|
| 47 |
configure /usr/share/alternc/1.0/install/etc/apache-ssl/httpd.conf |
|---|
| 48 |
echo "Configuring apache-ssl" |
|---|
| 49 |
configure /etc/apache-ssl/httpd.conf |
|---|
| 50 |
configure /usr/share/alternc/1.0/install/etc/apache/httpd.conf |
|---|
| 51 |
/usr/share/alternc/install/dopo.sh || true |
|---|
| 52 |
/etc/init.d/apache reload || true |
|---|
| 53 |
ln /usr/lib/cgi-bin/awstats.pl /var/alternc/cgi-bin/ -sf |
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 |
if [ -z `grep menu_aws.php /var/alternc/bureau/admin/menulist.txt` ] |
|---|
| 57 |
then |
|---|
| 58 |
echo "menu_aws.php" >>/var/alternc/bureau/admin/menulist.txt |
|---|
| 59 |
echo "you may move menu_aws.php to a better place in /var/alternc/bureau/admin/menulist.txt" |
|---|
| 60 |
fi |
|---|
| 61 |
|
|---|
| 62 |
;; |
|---|
| 63 |
|
|---|
| 64 |
abort-upgrade) |
|---|
| 65 |
exit 0 |
|---|
| 66 |
;; |
|---|
| 67 |
|
|---|
| 68 |
abort-remove|abort-deconfigure) |
|---|
| 69 |
exit 0 |
|---|
| 70 |
;; |
|---|
| 71 |
|
|---|
| 72 |
*) |
|---|
| 73 |
echo "postinst called with unknown argument '$1'" >&2 |
|---|
| 74 |
exit 1 |
|---|
| 75 |
;; |
|---|
| 76 |
esac |
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
exit 0 |
|---|