Line 1... |
Line 1... |
1 |
#/bin/bash
|
1 |
#/bin/bash
|
2 |
# $Id: alcasar-conf.sh 1050 2013-03-24 14:57:22Z richard $
|
2 |
# $Id: alcasar-conf.sh 1053 2013-03-24 22:52:52Z richard $
|
3 |
|
3 |
|
4 |
# alcasar-conf.sh
|
4 |
# alcasar-conf.sh
|
5 |
# by REXY
|
5 |
# by REXY
|
6 |
# This script is distributed under the Gnu General Public License (GPL)
|
6 |
# This script is distributed under the Gnu General Public License (GPL)
|
7 |
|
7 |
|
Line 249... |
Line 249... |
249 |
[ -e $DIR_UPDATE/server-chain.crt ] && cp -f $DIR_UPDATE/server-chain.crt /etc/pki/tls/certs/
|
249 |
[ -e $DIR_UPDATE/server-chain.crt ] && cp -f $DIR_UPDATE/server-chain.crt /etc/pki/tls/certs/
|
250 |
chown -R root:apache /etc/pki
|
250 |
chown -R root:apache /etc/pki
|
251 |
chmod -R 750 /etc/pki
|
251 |
chmod -R 750 /etc/pki
|
252 |
# Import de la dernière base usagers
|
252 |
# Import de la dernière base usagers
|
253 |
mysql -u$DB_USER -p$radiuspwd < `ls $DIR_UPDATE/radius*`
|
253 |
mysql -u$DB_USER -p$radiuspwd < `ls $DIR_UPDATE/radius*`
|
254 |
# Récupération des paramêtres locaux (fichier de conf, règles de filtrage, fichiers d'exception, comptes de gestion, etc.)
|
254 |
# Récupération des paramêtres locaux. Suppression des fichier de la blacklist (dorénavant exploités dans /usr/local/share)
|
255 |
[ -d $DIR_UPDATE/etc ] && cp -rf $DIR_UPDATE/etc/* $DIR_ETC/
|
255 |
[ -d $DIR_UPDATE/etc ] && rm -rf $DIR_UPDATE/etc/alcasar-dnsfilter* && cp -rf $DIR_UPDATE/etc/* $DIR_ETC/
|
256 |
# Récupération des fichiers de Dansguardian
|
256 |
# Récupération des fichiers de Dansguardian
|
257 |
[ -e $DIR_UPDATE/exceptioniplist ] && cp -f $DIR_UPDATE/exceptioniplist /etc/dansguardian/lists/
|
257 |
[ -e $DIR_UPDATE/exceptioniplist ] && cp -f $DIR_UPDATE/exceptioniplist /etc/dansguardian/lists/
|
258 |
[ -e $DIR_UPDATE/exceptionsitelist ] && cp -f $DIR_UPDATE/exceptionsitelist /etc/dansguardian/lists/
|
258 |
[ -e $DIR_UPDATE/exceptionsitelist ] && cp -f $DIR_UPDATE/exceptionsitelist /etc/dansguardian/lists/
|
259 |
[ -e $DIR_UPDATE/urlregexplist ] && cp -f $DIR_UPDATE/urlregexplist /etc/dansguardian/lists/
|
259 |
[ -e $DIR_UPDATE/urlregexplist ] && cp -f $DIR_UPDATE/urlregexplist /etc/dansguardian/lists/
|
260 |
[ -e $DIR_UPDATE/bannedsitelist ] && cp -f $DIR_UPDATE/bannedsitelist /etc/dansguardian/lists/
|
260 |
[ -e $DIR_UPDATE/bannedsitelist ] && cp -f $DIR_UPDATE/bannedsitelist /etc/dansguardian/lists/
|
Line 264... |
Line 264... |
264 |
chown -R dansguardian:apache /etc/dansguardian/lists
|
264 |
chown -R dansguardian:apache /etc/dansguardian/lists
|
265 |
chmod -R g+rw /etc/dansguardian/lists
|
265 |
chmod -R g+rw /etc/dansguardian/lists
|
266 |
# Start / Stop DNS/URL filtering
|
266 |
# Start / Stop DNS/URL filtering
|
267 |
PARENT_SCRIPT=$0
|
267 |
PARENT_SCRIPT=$0
|
268 |
export PARENT_SCRIPT
|
268 |
export PARENT_SCRIPT
|
- |
|
269 |
$DIR_SBIN/alcasar-bl.sh -adapt
|
269 |
$DIR_SBIN/alcasar-bl.sh -reload
|
270 |
$DIR_SBIN/alcasar-bl.sh -reload
|
270 |
[ -e $DIR_UPDATE/dnsmasq ] && cp -f $DIR_UPDATE/dnsmasq /etc/sysconfig/dnsmasq
|
271 |
[ -e $DIR_UPDATE/dnsmasq ] && cp -f $DIR_UPDATE/dnsmasq /etc/sysconfig/dnsmasq
|
271 |
# Prise en compte des comptes de gestion (admin + manager + backup)
|
272 |
# Prise en compte des comptes de gestion (admin + manager + backup)
|
272 |
$DIR_SBIN/alcasar-profil.sh --list
|
273 |
$DIR_SBIN/alcasar-profil.sh --list
|
273 |
# Start / Stop SSH Daemon
|
274 |
# Start / Stop SSH Daemon
|