Subversion Repositories ALCASAR

Rev

Rev 309 | Rev 311 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 309 Rev 310
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#  $Id: alcasar.sh 309 2010-10-26 21:58:25Z richard $ 
2
#  $Id: alcasar.sh 310 2010-11-05 17:01:52Z richard $ 
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
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 417... Line 417...
417
server 1.fr.pool.ntp.org
417
server 1.fr.pool.ntp.org
418
server 2.fr.pool.ntp.org
418
server 2.fr.pool.ntp.org
419
restrict default nomodify notrap noquery
419
restrict default nomodify notrap noquery
420
restrict $PRIVATE_NETWORK mask $PRIVATE_MASK
420
restrict $PRIVATE_NETWORK mask $PRIVATE_MASK
421
restrict 127.0.0.1
421
restrict 127.0.0.1
422
driftfile /etc/ntp/drift
422
driftfile /var/lib/ntp/drift
423
logfile /var/log/ntp.log
423
logfile /var/log/ntp.log
424
EOF
424
EOF
425
	chown -R ntp:ntp /etc/ntp
425
	chown -R ntp:ntp /var/lib/ntp
426
# synchronisation horaire
426
# synchronisation horaire
427
	ntpd -q -g &
427
	ntpd -q -g &
428
# Renseignement des fichiers hosts.allow et hosts.deny
428
# Renseignement des fichiers hosts.allow et hosts.deny
429
	[ -e /etc/hosts.allow.default ]  || cp /etc/hosts.allow /etc/hosts.allow.default
429
	[ -e /etc/hosts.allow.default ]  || cp /etc/hosts.allow /etc/hosts.allow.default
430
	cat <<EOF > /etc/hosts.allow
430
	cat <<EOF > /etc/hosts.allow
Line 1168... Line 1168...
1168
1 1 * * * root /usr/bin/tot_stats > /dev/null 2>&1
1168
1 1 * * * root /usr/bin/tot_stats > /dev/null 2>&1
1169
5 1 * * * root /usr/bin/monthly_tot_stats > /dev/null 2>&1
1169
5 1 * * * root /usr/bin/monthly_tot_stats > /dev/null 2>&1
1170
10 1 1 * * root /usr/bin/truncate_radacct > /dev/null 2>&1
1170
10 1 1 * * root /usr/bin/truncate_radacct > /dev/null 2>&1
1171
15 1 1 * * root /usr/bin/clean_radacct > /dev/null 2>&1
1171
15 1 1 * * root /usr/bin/clean_radacct > /dev/null 2>&1
1172
EOF
1172
EOF
1173
# activation du "chien de garde" (watchdog) toutes les 3' afin de déconnecter les usagers authentifiés dont la station est usurpée ou ne répond plus
1173
# activation du "chien de garde" (watchdog) toutes les 3'
1174
	cat << EOF > /etc/cron.d/watchdog
1174
	cat << EOF > /etc/cron.d/watchdog
1175
*/3 * * * * root $DIR_DEST_BIN/alcasar-watchdog.sh > /dev/null 2>&1
1175
*/3 * * * * root $DIR_DEST_BIN/alcasar-watchdog.sh > /dev/null 2>&1
1176
EOF
1176
EOF
1177
} # End cron
1177
} # End cron
1178
 
1178