7,11 → 7,11 |
|
# Ce script permet la mise à jour ALCASAR |
# - création de l'archive des fichiers de configuration dans "/tmp/alcasar-conf.tar.gz" (alcasar-conf.sh -create) |
# - chargement de l'archive de fichiers de configuration lors de la mise à jour d'un alcasar (alcasar-conf -load) |
# - chargement de l'archive de fichiers de configuration lors de la mise à jour d'un alcasar (alcasar-conf -load). Le cas échéant, c'est ici qu'on met à jour les fichiers entre versions |
# - application des directives du fichier de conf central "/usr/local/etc/alcasar.conf" lors d'un changement de conf réseau à chaud (alcasar-conf -apply) |
# This script allows ALCASAR update |
# - create the configuration files backup "/tmp/alcasar-conf.tar.gz" (alcasar-conf.sh -create) |
# - load the backup of configuration files during the update process (alcasar-conf -load) |
# - load the backup of configuration files during the update process (alcasar-conf -load). If needed, it's here we update files between versions |
# - apply ALCASAR central configuration file "/usr/local/etc/alcasar.conf" when hot modification is needed (alcasar-conf -apply) |
|
new="$(date +%G%m%d-%Hh%M)" # date et heure des fichiers |
155,7 → 155,7 |
# admin profile update (admin + manager + backup) |
$DIR_BIN/alcasar-profil.sh --list |
# Start / Stop SSH Daemon |
ssh_active=`grep SSH= $CONF_FILE|cut -d"=" -f2` |
ssh_active=`grep "^SSH=" $CONF_FILE|cut -d"=" -f2` |
if [ $ssh_active = "on" ] |
then |
/usr/bin/systemctl -q enable sshd.service |
164,6 → 164,14 |
fi |
# Remove the update folder |
rm -rf $DIR_UPDATE |
# If needed : write modifications between version |
# V3.1.3 |
# add "HTTPS_LOGIN=on" in conf file |
HTTPS_LOGIN=`grep -c "^HTTPS_LOGIN=" $CONF_FILE` |
if [ $HTTPS_LOGIN != "1" ] |
then |
echo "HTTPS_LOGIN=on" >> $CONF_FILE |
fi |
;; |
--apply|-apply) |
PTN="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/([012]?[0-9]|3[0-2])\b" |