[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-backup/usr/share/se3/sbin/ -> umountusbdisk.sh (source)

   1  #!/bin/bash
   2  
   3  #
   4  ## $Id: umountusbdisk.sh 8418 2015-01-27 23:57:30Z keyser $ ##
   5  #
   6  ##### Démonte le disque USB ou NAS #####
   7  #
   8  
   9  if [ "$1" = "--help" -o "$1" = "-h" ]
  10  then
  11      echo "Démonte le disque USB/NAS"
  12      echo "Usage : aucune option"
  13      exit
  14  fi
  15  
  16  #init params bdd
  17  . /usr/share/se3/includes/config.inc.sh -b
  18  
  19  if [ "$bpcmedia" = "3" ]; then
  20      NAS_mntsuffix=`mysql se3db -u $dbuser -p$dbpass -B -N -e "select value from params where name='NAS_NAS_mntsuffix'"`
  21  else
  22      $NAS_mntsuffix=""
  23  fi
  24  
  25  echo "Deconnexion du disque de sauvegarde en cours..."
  26  /etc/init.d/backuppc stop > /dev/null
  27  sleep 2
  28  ps auxw |grep backuppc | grep www-se3 >/dev/null && killall -9 "/usr/bin/perl"
  29  mount |grep "\/var\/lib\/backuppc" >/dev/null || MBPC=0
  30  if [ ! "$MBPC" = "0" ]; then
  31      umount /var/lib/backuppc/$NAS_mntsuffix
  32  fi
  33  mount |grep "\/var\/lib\/backuppc" >/dev/null && EXIT1=1
  34  if [ "$EXIT1" = 1 ]; then
  35      echo "Impossible de démonter le disque de sauvegarde" 
  36      echo "Impossible de démonter le disque de sauvegarde" | mail -s "Erreur sauvegarde se3" root
  37      exit 1
  38  fi


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