Commit c40e2ab7 authored by Daniel STAN's avatar Daniel STAN

(vieux) retrait du dossier squid

parent 89121121
......@@ -43,9 +43,6 @@ lc_ldap/
wifi_new/
intranet/
# rebuts
impression/inutiles/
# Management Information Bases pour le SNMP
mibs/
......@@ -53,7 +50,6 @@ mibs/
src/
# Dossiers de fichiers générés
var/
squid/errors/
surveillance/mac_prises/output/
doc/build/
......
#! /bin/sh
#
# copie les fichiers de blackliste du nfs vers les dossiers de squid
#
#echo -e "\033[1;32mSuppression des fichiers de squid...\033[1;0m"
#rm -v /usr/share/squid3/errors/*/ERR_CUSTOM_*
#echo -e "\033[1;32mCopie des fichiers vers squid...\033[1;0m"
for i in /usr/share/squid3/errors/*; do
for j in /usr/scripts/var/deco_wiki_dump/*ERR_CUSTOM*; do
k=ERR${j#*ERR}; install -m 644 $j $i/${k%.html}
done; done
#echo -e "\033[1;32mRedmarage de squid...\033[1;0m"
(/etc/init.d/squid3 restart > /dev/null || echo 'Ooups: impossible de relancer squid') \
2>&1 | grep -v "Warning: empty ACL"
#! /bin/sh
# dumpe les fichiers du wiki
echo -e "\033[1;32mDump des fichiers du wiki...\033[1;0m"
/usr/scripts/squid/dump-from-wiki.py
# copie vers squid
ssh -i /usr/scripts/squid/id-squid charybde.adm.crans.org
#!/bin/zsh
umask 0177
if [[ `hostname` == 'sable' ]]; then
logs_src=/var/log/squid3
else
logs_src=/var/log/squid
fi
logs_dst="/home/squid/`hostname`/logs"
if [ ! -d "$logs_dst" ]; then
echo "Destination des logs inexistante"
exit 42
fi
while ( ls -tr "$logs_src" | grep -E 'access\.log\.[0-9]+\..z2?' ); do
dernier_fichier=$logs_src/$(ls -tr "$logs_src" | grep -E 'access\.log\.[0-9]+\..z2?' | head -1)
timestamp=$(bzcat "$dernier_fichier" | head -1 | awk '{print $1}')
date=$(date -d "1970-01-01 $timestamp sec" +"%Y-%m-%d")
echo install -o root -g root -m 400 "$dernier_fichier" "$logs_dst/access.log.$date.bz2"
echo rm "$dernier_fichier"
install -o root -g root -m 400 "$dernier_fichier" "$logs_dst/access.log.$date.bz2"
rm "$dernier_fichier"
done
#find "$logs_dst" -mtime +365 -delete
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment