#!/bin/bash

DIR=`dirname $0`
srvname=`cat $DIR/srvname`
if [ -z "$srvname" ]
then
    echo "Veuillez entrer le nom du serveur (ex: malraux1) :"
    read srvname
    echo $srvname > $DIR/srvname
fi

echo "Copying configuration"
if [ $srvname != 'malraux1' ]
then
    sed -e "s/malraux1/$srvname/g" $DIR/eole/config.eol > /etc/eole/config.eol
fi
cp -v $DIR/eole/creole/* /usr/share/eole/creole/modif
cp -v $DIR/eole/era/* /usr/share/era/modeles

gen_patch
