Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 1261 2013-12-12 22:35:13Z richard $
|
2 |
# $Id: alcasar.sh 1266 2013-12-15 21:12:46Z richard $
|
3 |
|
3 |
|
4 |
# alcasar.sh
|
4 |
# alcasar.sh
|
5 |
|
5 |
|
6 |
# ALCASAR Install script - CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...]
|
6 |
# ALCASAR Install script - CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...]
|
7 |
# Ce programme est un logiciel libre ; This software is free and open source
|
7 |
# Ce programme est un logiciel libre ; This software is free and open source
|
Line 40... |
Line 40... |
40 |
# param_dansguardian : DansGuardian filtering HTTP proxy configuration
|
40 |
# param_dansguardian : DansGuardian filtering HTTP proxy configuration
|
41 |
# antivirus : HAVP + libclamav configuration
|
41 |
# antivirus : HAVP + libclamav configuration
|
42 |
# param_nfsen : Configuration du grapheur nfsen pour apache
|
42 |
# param_nfsen : Configuration du grapheur nfsen pour apache
|
43 |
# dnsmasq : Name server configuration
|
43 |
# dnsmasq : Name server configuration
|
44 |
# BL : BlackList of Toulouse configuration : split into 3 BL (for Dnsmasq, for dansguardian and for Netfilter)
|
44 |
# BL : BlackList of Toulouse configuration : split into 3 BL (for Dnsmasq, for dansguardian and for Netfilter)
|
45 |
# cron : Mise en place des exports de logs (+ chiffrement)
|
45 |
# cron : Logs export + watchdog + connexion statistics
|
46 |
# fail2ban : Fail2ban installation and configuration
|
46 |
# fail2ban : Fail2ban installation and configuration
|
47 |
# post_install : Finalisation environnement ( sécurité, bannières, rotation logs, ...)
|
47 |
# post_install : Security, log rotation, etc.
|
48 |
|
48 |
|
49 |
DATE=`date '+%d %B %Y - %Hh%M'`
|
49 |
DATE=`date '+%d %B %Y - %Hh%M'`
|
50 |
DATE_SHORT=`date '+%d/%m/%Y'`
|
50 |
DATE_SHORT=`date '+%d/%m/%Y'`
|
51 |
Lang=`echo $LANG|cut -c 1-2`
|
51 |
Lang=`echo $LANG|cut -c 1-2`
|
52 |
# ******* Files parameters - paramètres fichiers *********
|
52 |
# ******* Files parameters - paramètres fichiers *********
|
Line 1645... |
Line 1645... |
1645 |
fi
|
1645 |
fi
|
1646 |
done
|
1646 |
done
|
1647 |
# Load and apply the previous conf file
|
1647 |
# Load and apply the previous conf file
|
1648 |
if [ "$mode" = "update" ]
|
1648 |
if [ "$mode" = "update" ]
|
1649 |
then
|
1649 |
then
|
1650 |
# export des logs en 'retard' dans /var/Save/logs
|
1650 |
$DIR_DEST_BIN/alcasar-archive.sh --now # exports current logs in /var/Save/logs
|
1651 |
/usr/local/bin/alcasar-archive.sh --now
|
- |
|
1652 |
$DIR_DEST_BIN/alcasar-conf.sh --load
|
1651 |
$DIR_DEST_BIN/alcasar-conf.sh --load
|
1653 |
PARENT_SCRIPT=`basename $0`
|
1652 |
PARENT_SCRIPT=`basename $0`
|
1654 |
export PARENT_SCRIPT # to avoid stop&start process during the installation process
|
1653 |
export PARENT_SCRIPT # to avoid stop&start process during the installation process
|
1655 |
$DIR_DEST_BIN/alcasar-conf.sh --apply
|
1654 |
$DIR_DEST_BIN/alcasar-conf.sh --apply
|
1656 |
$SED "s?^INSTALL_DATE=.*?INSTALL_DATE=$DATE?g" $CONF_FILE
|
1655 |
$SED "s?^INSTALL_DATE=.*?INSTALL_DATE=$DATE?g" $CONF_FILE
|