Subversion Repositories ALCASAR

Rev

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

Rev 667 Rev 671
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#  $Id: alcasar.sh 667 2011-07-01 16:35:01Z franck $ 
2
#  $Id: alcasar.sh 671 2011-07-01 18:36:42Z franck $ 
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 1192... Line 1192...
1192
	cat <<EOF > /etc/cron.d/alcasar-clean_log
1192
	cat <<EOF > /etc/cron.d/alcasar-clean_log
1193
30 4 * * 1 root $DIR_DEST_BIN/alcasar-log-clean.sh
1193
30 4 * * 1 root $DIR_DEST_BIN/alcasar-log-clean.sh
1194
EOF
1194
EOF
1195
# export de la base des usagers (tous les lundi à 4h45)
1195
# export de la base des usagers (tous les lundi à 4h45)
1196
	cat <<EOF > /etc/cron.d/alcasar-mysql
1196
	cat <<EOF > /etc/cron.d/alcasar-mysql
1197
45 4 * * 1 root $DIR_DEST_SBIN/alcasar-mysql.sh -dump
1197
45 4 * * 1 root $DIR_DEST_SBIN/alcasar-mysql.sh --dump
1198
EOF
1198
EOF
1199
# export des log squid, firewall et apache (tous les lundi à 5h00)
1199
# export des log squid, firewall et apache (tous les lundi à 5h00)
1200
	cat <<EOF > /etc/cron.d/alcasar-export_log
1200
	cat <<EOF > /etc/cron.d/alcasar-export_log
1201
#!/bin/sh
1201
#!/bin/sh
1202
00 5 * * 1 root $DIR_DEST_BIN/alcasar-log-export.sh
1202
00 5 * * 1 root $DIR_DEST_BIN/alcasar-log-export.sh
Line 1225... Line 1225...
1225
5 1 * * * root /usr/bin/monthly_tot_stats > /dev/null 2>&1
1225
5 1 * * * root /usr/bin/monthly_tot_stats > /dev/null 2>&1
1226
10 1 1 * * root /usr/bin/truncate_radacct > /dev/null 2>&1
1226
10 1 1 * * root /usr/bin/truncate_radacct > /dev/null 2>&1
1227
15 1 1 * * root /usr/bin/clean_radacct > /dev/null 2>&1
1227
15 1 1 * * root /usr/bin/clean_radacct > /dev/null 2>&1
1228
EOF
1228
EOF
1229
# activation du "chien de garde" (watchdog) toutes les 3'
1229
# activation du "chien de garde" (watchdog) toutes les 3'
1230
	cat << EOF > /etc/cron.d/watchdog
1230
	cat << EOF > /etc/cron.d/alcasar-watchdog
1231
*/3 * * * * root $DIR_DEST_BIN/alcasar-watchdog.sh > /dev/null 2>&1
1231
*/3 * * * * root $DIR_DEST_BIN/alcasar-watchdog.sh > /dev/null 2>&1
1232
EOF
1232
EOF
1233
# suppression des crons usagers
1233
# suppression des crons usagers
1234
	rm -f /var/spool/cron/*
1234
	rm -f /var/spool/cron/*
1235
} # End cron
1235
} # End cron