root/alternc-awstats/trunk/debian/postrm

Revision 2243, 1.6 kB (checked in by engelaere, 7 months ago)

suppression de l'utilisation de local.sh. Fix apache utilisation

  • 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 MENUFILE="/etc/alternc/menulist.txt"
4
5 # Remove awstats include to the apache configuration file given as argument
6 # function unconfigure {
7 #     if grep -Eqs "\*\*\*AWSTATS\*\*\*" $1; then
8 #       cp -a -f $1 $1.alternc_awstats
9 #       cat $1 | grep -v "\*\*\*MAILMAN\*\*\*" |
10 #           grep -v "   Include \"\/etc\/apache\/alternc-awstats.conf\"/" \
11 #           > $1.alternc_awstats
12 #       mv -f $1.alternc_awstats $1
13 #     fi
14 # }
15
16 case "$1" in
17   remove)
18     # Remove Awstats references from Apache configuration
19     # unconfigure /etc/alternc/templates/apache/httpd.conf
20     # unconfigure /etc/alternc/templates/apache-ssl/httpd.conf
21     alternc.install
22
23     if grep -qs "menu_aws.php" $MENUFILE; then
24         rm -f $MENUFILE.alternc_awstats
25         cat $MENUFILE | grep -v "menu_aws.php" >$MENUFILE.alternc_awstats
26         mv -f $MENUFILE.alternc_awstats $MENUFILE
27     fi
28     ;;
29   purge)
30     /usr/lib/alternc/quota_delete aws
31     if [ -e "$CONFIGFILE" -a -x "/usr/bin/mysql" ]; then
32         . "$CONFIGFILE"
33         mysql -f --defaults-file=/etc/alternc/my.cnf \
34               -e "DROP TABLE IF EXISTS aws,aws_users,aws_access;"
35     fi
36     rm -rf /var/cache/awstats
37     rm -f /etc/alternc/awstats.htpasswd
38     rm -f /etc/alternc/alterncawstats.conf \
39         /etc/apache-ssl/conf.d/alterncawstats.conf
40     if [ -x /usr/sbin/apache ]; then
41         rm -f /etc/apache/conf.d/alterncawstats.conf
42     fi
43     if [ -x /usr/sbin/apache2 ]; then
44         rm -f /etc/apache2/conf.d/alterncawstats.conf
45     fi
46     ;;
47 esac
48
49 # dh_installdeb will replace this with shell code automatically
50 # generated by other debhelper scripts.
51 #DEBHELPER#
52
Note: See TracBrowser for help on using the browser.