From d81421a0ef8ad8a8b48910d436dbd960ff968dc8 Mon Sep 17 00:00:00 2001 From: jbousquie Date: Wed, 30 Nov 2016 11:43:52 +0100 Subject: [PATCH] ajout bloque_salle.sh --- admin/scripts_distants/squid/bloque_salle.sh | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 admin/scripts_distants/squid/bloque_salle.sh diff --git a/admin/scripts_distants/squid/bloque_salle.sh b/admin/scripts_distants/squid/bloque_salle.sh new file mode 100644 index 0000000..06caec5 --- /dev/null +++ b/admin/scripts_distants/squid/bloque_salle.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Script de blocage de salles. +# usage : bloque_salles a200 b300 a201 +# + +for arg in $* +do + if [ -f /var/lib/squidguard/salles/$arg ] + then + cp /var/lib/squidguard/salles/$arg /var/lib/squidguard/db/salles/ + chown -R proxy: /var/lib/squidguard/db/salles + touch /var/www/salles/rep_salles/$arg + recharge=1 + fi +done +if [ $recharge ] +then + /etc/init.d/squid3 reload +fi +exit