source: trunk/debian/postrm @ 1196

Revision 1196, 1.3 KB checked in by anonymous, 9 years ago (diff)

virer le repertoire /usr/share/alternc/1.0/install en faveur de juste /usr/share/alternc/install, comme ailleurs dans alternc

  • 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# Cette fonction regarde si un fichier de config ($1) a déjà reçu une modif
4# de config, et si oui, lui enleve les lignes voulues
5function unconfigure {
6    if grep -qs "\*\*\*MAILMAN\*\*\*" $1
7        then
8        # 1. on déplace le fichier
9        rm -f $1.alternc_mailman
10        cat $1 | grep -v "\*\*\*MAILMAN\*\*\*" | grep -v "      Alias /marchives/ /var/lib/mailman/archives/public/" | grep -v "Alias /mimages/ /usr/share/images/mailman/" >$1.alternc_mailman
11        mv -f $1.alternc_mailman $1 
12    fi
13}
14
15if [ "$1" = "purge" ] 
16then
17    unconfigure /etc/apache/httpd.conf
18    unconfigure /etc/apache-ssl/httpd.conf
19    unconfigure /usr/share/alternc/install/etc/apache/httpd.conf
20    unconfigure /usr/share/alternc/install/etc/apache-ssl/httpd.conf
21    . /etc/alternc/local.sh
22    mysql -f -u"$MYSQL_USER" -p"$MYSQL_PASS" "$MYSQL_DATABASE" -e "DROP TABLE IF EXISTS mailman"
23    rm -f /var/alternc/cgi-bin/mailman
24    MENUFILE=/var/alternc/bureau/admin/menulist.txt
25    if grep -qs "menu_mailman.php" $MENUFILE
26    then
27        rm -f $MENUFILE.alternc_mailman
28        cat $MENUFILE | grep -v "menu_mailman.php" >$MENUFILE.alternc_mailman
29        mv -f $MENUFILE.alternc_mailman $MENUFILE
30    fi
31fi
32# purge
33
34# dh_installdeb will replace this with shell code automatically
35# generated by other debhelper scripts.
36#DEBHELPER#
Note: See TracBrowser for help on using the repository browser.