[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3master/var/cache/se3_install/ -> uninstall.sh (source)

   1  #!/bin/bash
   2  
   3  # **********************************************************
   4  # Désinstallation de SambaEdu3 Version 0.1
   5  # 22 Juillet 2002
   6  # Auteur: Olivier LECLUSE
   7  # Ce script est diftribué selon les termes de la licence GPL
   8  # **********************************************************
   9  
  10  clear
  11  echo "Ce script détruira toute trace de SambaEdu!!"
  12  echo "Pour poursuivre, tapez \"Je suis SUR\""
  13  read rep
  14  if [ ! "$rep" = "Je suis SUR" ]; then
  15      echo "Abandon de la désinstallation"
  16  exit 0
  17  fi
  18  
  19  #
  20  # Détection de la distribution
  21  #
  22  
  23  clear
  24  echo "Détection de la distribution"
  25  
  26  if [ -e /etc/redhat-release ]; then
  27      cat /etc/redhat-release
  28      DISTRIB="RH"
  29      WWWPATH="/var/www/html"
  30      CGIPATH="/var/www/cgi-bin"
  31      APACHE="apache"
  32      LDAPGRP="ldap"
  33      SMBCONF="/etc/samba/smb.conf"
  34      SLAPDIR="openldap"
  35      SLAPDCONF="/etc/$SLAPDIR/slapd.conf"
  36      PAMLDAPCONF="/etc/ldap.conf"
  37      NSSLDAPCONF=""
  38      NSSWITCH="/etc/nsswitch.conf"
  39      INITDSAMBA="/etc/init.d/smb"
  40      INITDAPACHE="/etc/init.d/httpd"
  41      INITDSLAPD="/etc/init.d/ldap"
  42      INITDNSCD="/etc/init.d/nscd"
  43  fi
  44  if [ -e /etc/mandrake-release ]; then
  45      cat /etc/mandrake-release
  46      DISTRIB="MDK"
  47      WWWPATH="/var/www/html"
  48      CGIPATH="/var/www/cgi-bin"
  49      APACHE="apache"
  50      LDAPGRP="ldap"
  51      SMBCONF="/etc/samba/smb.conf"
  52      SLAPDIR="openldap"
  53      SLAPDCONF="/etc/$SLAPDIR/slapd.conf"
  54      PAMLDAPCONF="/etc/ldap.conf"
  55      NSSLDAPCONF=""
  56      NSSWITCH="/etc/nsswitch.conf"
  57      INITDSAMBA="/etc/init.d/smb"
  58      INITDAPACHE="/etc/init.d/httpd"
  59      INITDSLAPD="/etc/init.d/ldap"
  60      INITDNSCD="/etc/init.d/nscd"
  61  fi
  62  if [ -e /etc/debian_version ]; then
  63      echo "Debian détectée, félicitation ;-)"
  64      DISTRIB="DEB"
  65      WWWPATH="/var/www"
  66      CGIPATH="/usr/lib/cgi-bin"
  67      APACHE="www-data"
  68      LDAPGRP="root"
  69      SMBCONF="/etc/samba/smb.conf"
  70      SLAPDIR="ldap"
  71      SLAPDCONF="/etc/$SLAPDIR/slapd.conf"
  72      PAMLDAPCONF="/etc/pam_ldap.conf"
  73      NSSLDAPCONF="/etc/libnss-ldap.conf"
  74      NSSWITCH="/etc/nsswitch.conf"
  75      INITDSAMBA="/etc/init.d/samba"
  76      INITDAPACHE="/etc/init.d/apache"
  77      INITDSLAPD="/etc/init.d/slapd"
  78      INITDNSCD="/etc/init.d/nscd"
  79  fi
  80  
  81  $INITDSAMBA stop
  82  $INITDSLAPD stop
  83  $INITDSAMBA stop
  84  
  85  /bin/rm -r /usr/share/se3
  86  /bin/rm $WWWPATH/se3 -r
  87  /bin/rm $CGIPATH/gep.cgi
  88  /bin/rm /etc/SeConfig.ph
  89  /bin/rm /usr/lib/perl5/Se.pm
  90  /bin/rm /var/se3 -r
  91  
  92  /bin/mv $SMBCONF.se3sav $SMBCONF
  93  /bin/mv /etc/$SLAPDIR/ldap.conf.se3sav /etc/$SLAPDIR/ldap.conf
  94  /bin/mv $SLAPDCONF.se3sav $SLAPDCONF
  95  /bin/mv $PAMLDAPCONF.se3sav $PAMLDAPCONF
  96  if [ "$DISTRIB" = "deb" ]; then
  97      /bin/mv $NSSLDAPCONF.se3sav $NSSLDAPCONF
  98  fi
  99  /bin/mv $NSSWITCH.se3sav $NSSWITCH
 100  /bin/mv /var/lib/ldap /var/lib/ldap.old
 101  /bin/mv /var/lib/ldap.se3sav /var/lib/ldap
 102  #mysqladmin drop se3db
 103  #echo "DELETE FROM user WHERE User = 'se3db_admin'"|mysql mysql -u root -p
 104  #echo "DELETE FROM db WHERE User = 'se3db_admin'"|mysql mysql -u root -p
 105  
 106  $INITDNSCD start
 107  $INITDSLAPD start
 108  $INITDSAMBA start


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1