Alternc  latest
Alternc logiel libre pour l'hébergement
alternc-ssl.postrm
Go to the documentation of this file.
1 #!/bin/sh -e
2 
3 CONFIGFILE="/etc/alternc/my.cnf"
4 MENUFILE="/etc/alternc/menulist.txt"
5 
6 case "$1" in
7  remove)
8 
9  # TODO : we don't purge *-ssl vhosts or *-ssl templates, they may break the hosting ...
10  if [ -e "$CONFIGFILE" -a -x "/usr/bin/mysql" ]; then
11  mysql --defaults-file=${CONFIGFILE} -f -e "DELETE FROM domaines_type WHERE name IN ('vhost-ssl','vhost-mixssl','roundcube-ssl','squirrelmail-ssl','panel-ssl','php52-ssl','php52-mixssl');"
12  mysql --defaults-file=${CONFIGFILE} -f -e "UPDATE sub_domaines SET web_action='DELETE' WHERE type IN ('vhost-ssl','vhost-mixssl','roundcube-ssl','squirrelmail-ssl','panel-ssl','php52-ssl','php52-mixssl');"
13  fi
14  echo -e "\033[31m**********************************************"
15  echo "* *"
16  echo "* ALTERNC-SSL ACTION REQUESTED *"
17  echo "* *"
18  echo "* Please run alternc.install to fully remove *"
19  echo "* *"
20  echo "**********************************************"
21  echo -e "\033[0m"
22 
23 ;;
24  purge)
25  # Purge the certificate and alias table:
26  if [ -e "$CONFIGFILE" -a -x "/usr/bin/mysql" ]; then
27  mysql --defaults-file=${CONFIGFILE} -f -e "DROP TABLE IF EXISTS certificate;"
28  mysql --defaults-file=${CONFIGFILE} -f -e "DROP TABLE IF EXISTS certif_alias;"
29  mysql --defaults-file=${CONFIGFILE} -f -e "DROP TABLE IF EXISTS certif_hosts;"
30  fi
31  ;;
32 esac
33 
34 # dh_installdeb will replace this with shell code automatically
35 # generated by other debhelper scripts.
36 #DEBHELPER#