|
Revision 1081, 1.3 kB
(checked in by benjamin, 3 years ago)
|
removing prerm, unused now, postrm is doing its stuff + BUG ON REMOVE + podebconf update
|
- 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 |
CONFIGFILE="/etc/alternc/local.sh" |
|---|
| 4 |
MENUFILE="/etc/alternc/menulist.txt" |
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
function unconfigure { |
|---|
| 8 |
if grep -Eqs "\*\*\*AWSTATS\*\*\*" $1; then |
|---|
| 9 |
cp -a -f $1 $1.alternc_awstats |
|---|
| 10 |
cat $1 | grep -v "\*\*\*MAILMAN\*\*\*" | |
|---|
| 11 |
grep -v " Include \"\/etc\/apache\/alternc-awstats.conf\"/" \ |
|---|
| 12 |
> $1.alternc_awstats |
|---|
| 13 |
mv -f $1.alternc_awstats $1 |
|---|
| 14 |
fi |
|---|
| 15 |
} |
|---|
| 16 |
|
|---|
| 17 |
case "$1" in |
|---|
| 18 |
remove) |
|---|
| 19 |
|
|---|
| 20 |
unconfigure /etc/alternc/templates/apache/httpd.conf |
|---|
| 21 |
unconfigure /etc/alternc/templates/apache-ssl/httpd.conf |
|---|
| 22 |
alternc.install |
|---|
| 23 |
|
|---|
| 24 |
if grep -qs "menu_aws.php" $MENUFILE; then |
|---|
| 25 |
rm -f $MENUFILE.alternc_awstats |
|---|
| 26 |
cat $MENUFILE | grep -v "menu_aws.php" >$MENUFILE.alternc_awstats |
|---|
| 27 |
mv -f $MENUFILE.alternc_awstats $MENUFILE |
|---|
| 28 |
fi |
|---|
| 29 |
;; |
|---|
| 30 |
purge) |
|---|
| 31 |
/usr/lib/alternc/quota_delete aws |
|---|
| 32 |
if [ -e "$CONFIGFILE" -a -x "/usr/bin/mysql" ]; then |
|---|
| 33 |
. "$CONFIGFILE" |
|---|
| 34 |
mysql -f -u"$MYSQL_USER" -p"$MYSQL_PASS" -h"$MYSQL_HOST" \ |
|---|
| 35 |
"$MYSQL_DATABASE" -e "DROP TABLE IF EXISTS aws,aws_users,aws_access;" |
|---|
| 36 |
fi |
|---|
| 37 |
rm -rf /var/cache/awstats |
|---|
| 38 |
rm -f /etc/alternc/awstats.htpasswd |
|---|
| 39 |
;; |
|---|
| 40 |
esac |
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|