Subversion Repositories ALCASAR

Rev

Rev 478 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 478 Rev 518
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
# $Id: alcasar-log-export.sh 478 2011-02-07 23:17:10Z richard $
2
# $Id: alcasar-log-export.sh 518 2011-03-25 16:04:12Z stephane $
3
# alcasar-log-export.sh
3
# alcasar-log-export.sh
4
# by Franck BOUIJOUX
4
# by Franck BOUIJOUX
5
# This script is distributed under the Gnu General Public License (GPL)
5
# This script is distributed under the Gnu General Public License (GPL)
6
 
6
 
7
# Script permettant d'exporter des logs des répertoires /var/log/{squid-firewall-httpd} à des fins d'archivages.
7
# Script permettant d'exporter des logs des répertoires /var/log/{squid-firewall-httpd} à des fins d'archivages.
Line 25... Line 25...
25
	then
25
	then
26
# chiffrement des logs dans /var/Save/logs/(squid|firewall|httpd)
26
# chiffrement des logs dans /var/Save/logs/(squid|firewall|httpd)
27
		find . \( -mtime -7 -o -ctime 0 \) -a \( -name '*access*log*.gz' -o -name 'tracability*.gz' -o -name 'admin*.gz' \) -exec gpg --output $TO_SAVE/$i/{}.gpg --encrypt --recipient $GPG_USER {} \;
27
		find . \( -mtime -7 -o -ctime 0 \) -a \( -name '*access*log*.gz' -o -name 'tracability*.gz' -o -name 'admin*.gz' \) -exec gpg --output $TO_SAVE/$i/{}.gpg --encrypt --recipient $GPG_USER {} \;
28
	else	
28
	else	
29
# copie simple des logs dans /var/Save/logs/(squid|firewall|httpd) 
29
# copie simple des logs dans /var/Save/logs/(squid|firewall|httpd) 
30
 
-
 
31
		find . \( -mtime -7 -o -ctime 0 \) -a \( -name '*access*log*.gz' -o -name 'tracability*.gz' -o -name 'admin*.gz' \) -exec cp {} $TO_SAVE/$i/.  \;
30
		find . \( -mtime -7 -o -ctime 0 \) -a \( -name '*access*log*.gz' -o -name 'tracability*.gz' -o -name 'admin*.gz' \) -exec cp {} $TO_SAVE/$i/.  \;
32
	fi
31
	fi
33
done
32
done
34
chown -R apache.apache $TO_SAVE
33
chown -R apache.apache $TO_SAVE
35
exit 0
34
exit 0