267,6 → 267,8 |
network () |
{ |
header_install |
if [ "$mode" != "update" ] |
then |
if [ $Lang == "fr" ] |
then echo "Par défaut, l'adresse IP d'ALCASAR sur le réseau de consultation est : $DEFAULT_PRIVATE_IP_MASK" |
else echo "The default ALCASAR IP address on consultation network is : $DEFAULT_PRIVATE_IP_MASK" |
292,11 → 294,13 |
else echo -n "Enter ALCASAR IP address in CIDR format (a.b.c.d/xx) : " |
fi |
read PRIVATE_IP_MASK |
|
done |
else |
PRIVATE_IP_MASK=$DEFAULT_PRIVATE_IP_MASK |
fi |
else |
PRIVATE_IP_MASK=`grep PRIVATE_IP |cut -d"=" -f2` /tmp/conf/etc/alcasar.conf |
fi |
# Définition de la config réseau côté "LAN de consultation" |
hostname $HOSTNAME |
PRIVATE_NETWORK=`/bin/ipcalc -n $PRIVATE_IP_MASK | cut -d"=" -f2` # @ réseau de consultation (ex.: 192.168.182.0) |
1383,7 → 1387,6 |
$DIR_DEST_BIN/alcasar-conf.sh --load |
$SED "s?^INSTALL_DATE=.*?INSTALL_DATE=$DATE?g" $CONF_FILE |
$SED "s?^VERSION=.*?VERSION=$VERSION?g" $CONF_FILE |
$SED "s?^ORGANISM=.*?ORGANISM=$ORGANISM?g" $CONF_FILE |
fi |
rm -f /tmp/alcasar-conf* |
chown -R root:apache $DIR_DEST_ETC/* |
1460,7 → 1463,7 |
MAJ_RUNNING_VERSION=`echo $RUNNING_VERSION|cut -d"." -f1` |
MIN_RUNNING_VERSION=`echo $RUNNING_VERSION|cut -d"." -f2|cut -c1` |
UPD_RUNNING_VERSION=`echo $RUNNING_VERSION|cut -d"." -f3` |
# Create the conf file of the running version |
# Create a backup of running version importants files |
chmod u+x $DIR_SCRIPTS/alcasar-conf.sh |
$DIR_SCRIPTS/alcasar-conf.sh --create |
mode="update" |
1477,11 → 1480,13 |
# Uninstall the running version |
$DIR_SCRIPTS/sbin/alcasar-uninstall.sh |
fi |
# Test if manual update |
if [ -e /tmp/alcasar-conf.tar.gz ] && [ "$mode" != "update" ] |
then |
header_install |
if [ $Lang == "fr" ] |
then echo -n "Le fichier de configuration d'une ancienne version a été trouvé"; |
else echo -n "The configuration file of an old version has been found"; |
then echo "Le fichier de configuration d'une ancienne version a été trouvé"; |
else echo "The configuration file of an old version has been found"; |
fi |
response=0 |
PTN='^[oOnNyY]$' |
1497,6 → 1502,7 |
fi |
done |
fi |
# Test if update |
if [ -e /tmp/alcasar-conf.tar.gz ] |
then |
if [ $Lang == "fr" ] |
1503,9 → 1509,9 |
then echo "#### Installation avec mise à jour ####"; |
else echo "#### Installation with update ####"; |
fi |
# Read the organism name from the conf file |
tar -xvf /tmp/alcasar-conf.tar.gz conf/organisme |
ORGANISME=`cat $DIR_CONF/organisme` |
# Extract the central configuration file |
tar -xvf /tmp/alcasar-conf.tar.gz conf/etc/alcasar.conf -C /tmp |
ORGANISME=`cat /tmp/conf/etc/alcasar.conf|grep ORGANISM|cut -d"=" -f2` |
mode="update" |
else |
mode="install" |