root/alternc-awstats/tags/0.5.1/debian/postrm

Revision 1579, 1.5 kB (checked in by pierre-gilles, 3 years ago)

Now the awstats's apache specific conf stand in /etc/alternc/ and is linked in /etc/apache*/conf.d/

  • 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 # Remove awstats include to the apache configuration file given as argument
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     # Remove Awstats references from Apache configuration
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     rm -f /etc/alternc/alterncawstats.conf \
40         /etc/apache/conf.d/alterncawstats.conf \
41         /etc/apache-ssl/conf.d/alterncawstats.conf
42     ;;
43 esac
44
45 # dh_installdeb will replace this with shell code automatically
46 # generated by other debhelper scripts.
47 #DEBHELPER#
48
Note: See TracBrowser for help on using the browser.