Subversion Repositories ALCASAR

Rev

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

Rev 885 Rev 894
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 885 2012-06-11 21:33:50Z richard $ 
2
#  $Id: alcasar.sh 894 2012-06-18 14:23:43Z 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 1011... Line 1011...
1011
# linked squid output in HAVP input
1011
# linked squid output in HAVP input
1012
	echo "cache_peer 127.0.0.1 parent 8090 0 no-query default" >> /etc/squid/squid.conf
1012
	echo "cache_peer 127.0.0.1 parent 8090 0 no-query default" >> /etc/squid/squid.conf
1013
	echo "never_direct allow all" >> /etc/squid/squid.conf
1013
	echo "never_direct allow all" >> /etc/squid/squid.conf
1014
# avoid error messages on network interfaces state changes
1014
# avoid error messages on network interfaces state changes
1015
	$SED "s?^SQUID_AUTO_RELOAD.*?SQUID_AUTO_RELOAD=no?g" /etc/sysconfig/squid
1015
	$SED "s?^SQUID_AUTO_RELOAD.*?SQUID_AUTO_RELOAD=no?g" /etc/sysconfig/squid
-
 
1016
# reduce squid shutdown time (100 to 50)
-
 
1017
	$SED "s?^SQUID_SHUTDOWN_TIMEOUT.*?SQUID_SHUTDOWN_TIMEOUT=50?g" /etc/sysconfig/squid
-
 
1018
 
1016
# Squid cache init
1019
# Squid cache init
1017
	/usr/sbin/squid -z
1020
	/usr/sbin/squid -z
1018
}  # End of param_squid ()
1021
}  # End of param_squid ()
1019
	
1022
	
1020
##################################################################
1023
##################################################################
Line 1074... Line 1077...
1074
# création de l'usager 'havp'
1077
# création de l'usager 'havp'
1075
	havp_exist=`grep havp /etc/passwd|wc -l`
1078
	havp_exist=`grep havp /etc/passwd|wc -l`
1076
	if [ "$havp_exist" == "1" ]
1079
	if [ "$havp_exist" == "1" ]
1077
	then
1080
	then
1078
	      userdel -r havp 2>/dev/null
1081
	      userdel -r havp 2>/dev/null
-
 
1082
	      groupdel havp 2>/dev/null
1079
	fi
1083
	fi
1080
	groupadd -f havp
1084
	groupadd -f havp
1081
	useradd -r -g havp -s /bin/false -c "system user for havp" havp
1085
	useradd -r -g havp -s /bin/false -c "system user for havp" havp
1082
	mkdir -p /var/tmp/havp /var/log/havp
1086
	mkdir -p /var/tmp/havp /var/log/havp
1083
	chown -R havp /var/tmp/havp /var/log/havp /var/run/havp
1087
	chown -R havp /var/tmp/havp /var/log/havp /var/run/havp