[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-ocs/sources/debian/ -> postrm (source)

   1  #!/bin/sh
   2  # postrm script for se3-clonage
   3  #
   4  # see: dh_installdeb(1)
   5  
   6  set -e
   7  
   8  # summary of how this script can be called:
   9  #        * <postrm> `remove'
  10  #        * <postrm> `purge'
  11  #        * <old-postrm> `upgrade' <new-version>
  12  #        * <new-postrm> `failed-upgrade' <old-version>
  13  #        * <new-postrm> `abort-install'
  14  #        * <new-postrm> `abort-install' <old-version>
  15  #        * <new-postrm> `abort-upgrade' <old-version>
  16  #        * <disappearer's-postrm> `disappear' <overwriter>
  17  #          <overwriter-version>
  18  # for details, see http://www.debian.org/doc/debian-policy/ or
  19  # the debian-policy package
  20  
  21  
  22  case "$1" in
  23      purge)
  24  
  25      ### on suppose que l'on est sous debian  ####
  26      WWWPATH="/var/www"
  27      ## recuperation des variables necessaires pour interoger mysql ###
  28      if [ -e $WWWPATH/se3/includes/config.inc.php ]; then
  29          dbhost=`cat $WWWPATH/se3/includes/config.inc.php | grep "dbhost=" | cut -d = -f2 | cut -d \" -f2`
  30          dbname=`cat $WWWPATH/se3/includes/config.inc.php | grep "dbname=" | cut    -d = -f 2 |cut -d \" -f 2`
  31          dbuser=`cat $WWWPATH/se3/includes/config.inc.php | grep "dbuser=" | cut -d = -f 2 | cut -d \" -f 2`
  32          dbpass=`cat $WWWPATH/se3/includes/config.inc.php | grep "dbpass=" | cut -d = -f 2 | cut -d \" -f 2`
  33      else
  34          echo "Fichier de configuration inaccessible, le script ne peut se poursuivre."
  35          exit 1
  36      fi
  37      ##### REMOVE sudoers entry
  38      ;;
  39  
  40      remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)    
  41      ;;
  42  
  43  
  44      *)
  45          echo "postrm called with unknown argument \`$1'" >&2
  46          exit 1
  47      ;;
  48  esac
  49  
  50  # dh_installdeb will replace this with shell code automatically
  51  # generated by other debhelper scripts.
  52  
  53  #DEBHELPER#
  54  
  55  exit 0
  56  
  57  


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