[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

   1  #!/bin/bash
   2  
   3  hostname -d | grep -i ".clg14." && ETAB="clg14"
   4  hostname -d | grep -i ".clg50." && ETAB="clg50"
   5  hostname -d | grep -i ".clg61." && ETAB="clg61"
   6  hostname -d | grep -i ".lyc14." && ETAB="lyc14"
   7  hostname -d | grep -i ".lyc50." && ETAB="lyc50"
   8  hostname -d | grep -i ".lyc61." && ETAB="lyc61"
   9  
  10  if [ ! -z "$ETAB" ]; then
  11      echo "Installation des mises a jour departementales pour $ETAB"
  12      paraminst=`echo "SELECT count(*) FROM params WHERE name='majdepnbr';" | mysql se3db -N`
  13      if [ "$paraminst" = "0" ]; then
  14          mysql -D se3db -e "INSERT INTO params VALUES ('','majdepnbr',0,0,'indice de maj departementale',4);"
  15      fi
  16      cat maj_se.sh | sed -e "s/#ETAB#/$ETAB/g"> /usr/sbin/maj_se.sh
  17      chmod 700 /usr/sbin/maj_se.sh
  18      echo "0 6 * * 1-5 root /usr/sbin/maj_se.sh">>/etc/crontab
  19      /usr/sbin/maj_se.sh
  20  fi


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