root/alternc-changepass/tags/nightly_sarge/debian/postinst

Revision 1098, 1.2 kB (checked in by root, 4 years ago)

- debian compliance meilleure
- po-debconf
- correction GLOBAL
- norme COMMUNE avec alternc-procmail pour la gestion de plugins

  • 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 # Debian alternc-changepass postinst
4 # Benjamin Sonntag <benjamin@alternc.org>
5
6 . /usr/share/debconf/confmodule
7
8 case "$1" in
9 configure)
10
11     # On ajoute la ligne GLOBAL dans local.php si le fichier ne la contient pas ... (pour les alternc < 0.9.3)
12     FL=/var/alternc/bureau/class/local.php
13     echo -n "Configuring local.php "
14     if grep -qs "^global" $FL
15         then
16         echo "no patch needed, global already present"
17     else
18         echo "applying patch"
19         # the .php is here for security reasons ! as local.php contains the mysql password !
20         rm -f $FL.alternc_procmail.php
21         sed -e "s/^\$L_MX/\\
22 global \$L_MYSQL_HOST,\$L_MYSQL_LOGIN,\$L_MYSQL_PWD,\$L_MYSQL_DATABASE,\$L_SHOWVERSION,\$L_VERSION,\$L_FQDN,\$L_HOSTING,\$L_NS2,\$L_NS1,\$L_MX; \\
23 \$L_MX/" <$FL >$FL.alternc_procmail.php
24         mv -f $FL.alternc_procmail.php $FL
25     fi
26     db_get alternc-changepass/warning_squirrelmail_plugin || true
27
28     ;;
29
30 abort-upgrade)
31     exit 0
32     ;;
33
34 abort-remove|abort-deconfigure)
35     exit 0
36     ;;
37
38 *)
39     echo "postinst called with unknown argument '$1'" >&2
40     exit 1
41     ;;
42 esac
43
44 # dh_installdeb will replace this with shell code automatically
45 # generated by other debhelper scripts.
46
47 #DEBHELPER#
48
49 exit 0
Note: See TracBrowser for help on using the browser.