#!/bin/bash # Personnalisation de posh pour l'académie de Créteil DIR_TMP=personnalisation-cel DIR_SCRIPTS=/root/ DIR_POSH=/var/www/html/posh/ DIR_AJAXPLORER=/var/www/html/ajaxplorer/ DIR_RESSOURCES=/var/www/html/ressources/ DIR_THEME_CAS=/usr/share/sso/interface/ URL_DIFFUSION=http://diff.ac-creteil.fr/di/ftp/scribe/EnvOLE-2.0 ARCHIVE_PERSONNALISATION=personnalisation.tar.gz SCRIPT_PERSONNALISATION=personnalisation.php #récupération et mise en place des fichiers echo -e -n "Récupération des fichiers de la personnalisation Créteil... " cd /tmp rm -rf $DIR_TMP mkdir $DIR_TMP cd $DIR_TMP wget -q "$URL_DIFFUSION/$ARCHIVE_PERSONNALISATION" tar xzf $ARCHIVE_PERSONNALISATION > /dev/null 2>&1 if [[ -d posh && -d ressources && -d interface && -d scripts && -d ajaxplorer ]] then find posh -type d -exec chown root:www-data {} \; find posh -type d -exec chmod 750 {} \; find posh -type f -exec chown root:www-data {} \; find posh -type f -exec chmod 640 {} \; find ajaxplorer -type d -exec chown root:www-data {} \; find ajaxplorer -type d -exec chmod 750 {} \; find ajaxplorer -type f -exec chown root:www-data {} \; find ajaxplorer -type f -exec chmod 640 {} \; find ressources -type d -exec chown admin:www-data {} \; find ressources -type d -exec chmod 770 {} \; find ressources -type f -exec chown admin:www-data {} \; find ressources -type f -exec chmod 660 {} \; find interface -type d -exec chown root:root {} \; find interface -type d -exec chmod 755 {} \; find interface -type f -exec chown root:root {} \; find interface -type f -exec chmod 644 {} \; echo -e "OK" else echo -e "ERREUR" fi echo -e -n "Mise en place des fichiers personnalisés... " cp -rpf posh/* $DIR_POSH cp -rpf ajaxplorer/* $DIR_AJAXPLORER echo -e "OK" echo -e -n "Suppression des fichiers temporaires... " cd /tmp rm -rf $DIR_TMP echo -e "OK" exit 0