[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3master/usr/share/se3/scripts/ -> se3-upgrade.sh (source)

   1  #!/bin/bash
   2  #
   3  ## $Id$ ##
   4  #
   5  ##### Permet de faire la mise à jour de se3 et modules #####
   6  
   7  # 
   8  
   9  if [ "$1" = "--help" -o "$1" = "-h" ]
  10  then
  11          echo "Script permettant la mise a jour de se3 et de ses modules"
  12          echo "Usage : sans option "
  13          exit
  14  fi    
  15  
  16  echo "<pre>"
  17  echo "Mise a jour de la liste des paquets disponibles ....."
  18  apt-get -qq update
  19  (
  20  dpkg -l|grep se3|cut -d ' ' -f3|while read package
  21  do
  22  LC_ALL=C apt-get -s install $package|grep newest >/dev/null|| echo $package
  23  done
  24  )>/tmp/se3_update_list
  25  
  26  #echo "<br/>"
  27  LC_ALL=C apt-get -s install se3-domain 2>/dev/null | grep 'Inst' && apt-get install se3-domain --allow-unauthenticated -y | tee -a /tmp/se3_update_mail 
  28  LC_ALL=C apt-get install $(cat /tmp/se3_update_list) --allow-unauthenticated -y -o Dpkg::Options::=--force-confold 2>&1 | tee -a /tmp/se3_update_mail 
  29  if [ "$?" == "0" ]
  30  then
  31      echo "</pre>"
  32      echo "Mise a jour ok !<br/>"
  33  else
  34      echo "</pre>"
  35      echo "Mise a jour non ok !<br/>"
  36  fi
  37  
  38  cat /tmp/se3_update_mail | mail -s "[SE3] Resultat de la mise a jour" root
  39  rm -f /tmp/se3_update_mail
  40  rm -f /tmp/se3_update_list
  41  rm -f /etc/se3/update_available


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