Subversion Repositories ALCASAR

Rev

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

Rev 1705 Rev 1721
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 1705 2015-10-20 16:52:33Z richard $ 
2
#  $Id: alcasar.sh 1721 2015-12-09 23:08:05Z richard $ 
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
 
5
 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
7
# Ce programme est un logiciel libre ; This software is free and open source
7
# Ce programme est un logiciel libre ; This software is free and open source
Line 1253... Line 1253...
1253
# replace the default deny HTML page
1253
# replace the default deny HTML page
1254
	cp -f $DIR_CONF/template.html /usr/share/dansguardian/languages/ukenglish/
1254
	cp -f $DIR_CONF/template.html /usr/share/dansguardian/languages/ukenglish/
1255
	cp -f $DIR_CONF/template-fr.html /usr/share/dansguardian/languages/french/template.html
1255
	cp -f $DIR_CONF/template-fr.html /usr/share/dansguardian/languages/french/template.html
1256
# Don't log
1256
# Don't log
1257
	$SED "s?^loglevel =.*?loglevel = 0?g" $DIR_DG/dansguardian.conf
1257
	$SED "s?^loglevel =.*?loglevel = 0?g" $DIR_DG/dansguardian.conf
1258
# Run 10 daemons (20 in largest server)
-
 
1259
	$SED "s?^minchildren =.*?minchildren = 10?g" $DIR_DG/dansguardian.conf
-
 
1260
# on désactive par défaut le controle de contenu des pages html
1258
# on désactive par défaut le controle de contenu des pages html
1261
	$SED "s?^weightedphrasemode =.*?weightedphrasemode = 0?g" $DIR_DG/dansguardian.conf
1259
	$SED "s?^weightedphrasemode =.*?weightedphrasemode = 0?g" $DIR_DG/dansguardian.conf
1262
	cp $DIR_DG/lists/bannedphraselist $DIR_DG/lists/bannedphraselist.default
1260
	cp $DIR_DG/lists/bannedphraselist $DIR_DG/lists/bannedphraselist.default
1263
	$SED "s?^[^#]?#&?g" $DIR_DG/lists/bannedphraselist # (on commente ce qui ne l'est pas)
1261
	$SED "s?^[^#]?#&?g" $DIR_DG/lists/bannedphraselist # (on commente ce qui ne l'est pas)
1264
# on désactive par défaut le contrôle d'URL par expressions régulières
1262
# on désactive par défaut le contrôle d'URL par expressions régulières
1265
	cp $DIR_DG/lists/bannedregexpurllist $DIR_DG/lists/bannedregexpurllist.default
1263
	cp $DIR_DG/lists/bannedregexpurllist $DIR_DG/lists/bannedregexpurllist.default
1266
	$SED "s?^[^#]?#&?g" $DIR_DG/lists/bannedregexpurllist # (on commente ce qui ne l'est pas)
1264
	$SED "s?^[^#]?#&?g" $DIR_DG/lists/bannedregexpurllist # (on commente ce qui ne l'est pas)
-
 
1265
 
-
 
1266
# Configure Dansguardian for large site
-
 
1267
# Minimum number of processus to handle connections
-
 
1268
	$SED "s?^minchildren =.*?minchildren = 15?g" $DIR_DG/dansguardian.conf
-
 
1269
# Maximum number of processus to handle connections
-
 
1270
	$SED "s?^maxchildren =.*?maxchildren = 200?g" $DIR_DG/dansguardian.conf
-
 
1271
# Run at least 8 daemons
-
 
1272
	$SED "s?^minsparechildren =.*?minsparechildren = 8?g" $DIR_DG/dansguardian.conf
-
 
1273
# minimum number of processes to spawn
-
 
1274
	$SED "s?^preforkchildren =.*?preforkchildren = 10?g" $DIR_DG/dansguardian.conf
-
 
1275
# maximum age of a child process before it croaks it
-
 
1276
	$SED "s?^maxagechildren =.*?maxagechildren = 1000?g" $DIR_DG/dansguardian.conf
-
 
1277
	
1267
# on désactive par défaut le contrôle de téléchargement de fichiers
1278
# on désactive par défaut le contrôle de téléchargement de fichiers
1268
	[ -e $DIR_DG/dansguardianf1.conf.default ] || cp $DIR_DG/dansguardianf1.conf $DIR_DG/dansguardianf1.conf.default
1279
	[ -e $DIR_DG/dansguardianf1.conf.default ] || cp $DIR_DG/dansguardianf1.conf $DIR_DG/dansguardianf1.conf.default
1269
	$SED "s?^blockdownloads =.*?blockdownloads = off?g" $DIR_DG/dansguardianf1.conf
1280
	$SED "s?^blockdownloads =.*?blockdownloads = off?g" $DIR_DG/dansguardianf1.conf
1270
	[ -e $DIR_DG/lists/bannedextensionlist.default ] || mv $DIR_DG/lists/bannedextensionlist $DIR_DG/lists/bannedextensionlist.default
1281
	[ -e $DIR_DG/lists/bannedextensionlist.default ] || mv $DIR_DG/lists/bannedextensionlist $DIR_DG/lists/bannedextensionlist.default
1271
	[ -e $DIR_DG/lists/bannedmimetypelist.default ] || mv $DIR_DG/lists/bannedmimetypelist $DIR_DG/lists/bannedmimetypelist.default
1282
	[ -e $DIR_DG/lists/bannedmimetypelist.default ] || mv $DIR_DG/lists/bannedmimetypelist $DIR_DG/lists/bannedmimetypelist.default
Line 1520... Line 1531...
1520
listen-address=127.0.0.1
1531
listen-address=127.0.0.1
1521
no-dhcp-interface=$INTIF
1532
no-dhcp-interface=$INTIF
1522
no-dhcp-interface=tun0
1533
no-dhcp-interface=tun0
1523
no-dhcp-interface=lo
1534
no-dhcp-interface=lo
1524
bind-interfaces
1535
bind-interfaces
1525
cache-size=256
1536
cache-size=2048
1526
domain=$DOMAIN
1537
domain=$DOMAIN
1527
domain-needed
1538
domain-needed
1528
expand-hosts
1539
expand-hosts
1529
bogus-priv
1540
bogus-priv
1530
filterwin2k
1541
filterwin2k
Line 1549... Line 1560...
1549
port=54
1560
port=54
1550
no-dhcp-interface=$INTIF
1561
no-dhcp-interface=$INTIF
1551
no-dhcp-interface=tun0
1562
no-dhcp-interface=tun0
1552
no-dhcp-interface=lo
1563
no-dhcp-interface=lo
1553
bind-interfaces
1564
bind-interfaces
1554
cache-size=256
1565
cache-size=2048
1555
domain=$DOMAIN
1566
domain=$DOMAIN
1556
domain-needed
1567
domain-needed
1557
expand-hosts
1568
expand-hosts
1558
bogus-priv
1569
bogus-priv
1559
filterwin2k
1570
filterwin2k
Line 1571... Line 1582...
1571
port=55
1582
port=55
1572
no-dhcp-interface=$INTIF
1583
no-dhcp-interface=$INTIF
1573
no-dhcp-interface=tun0
1584
no-dhcp-interface=tun0
1574
no-dhcp-interface=lo
1585
no-dhcp-interface=lo
1575
bind-interfaces
1586
bind-interfaces
1576
cache-size=256
1587
cache-size=1024
1577
domain=$DOMAIN
1588
domain=$DOMAIN
1578
domain-needed
1589
domain-needed
1579
expand-hosts
1590
expand-hosts
1580
bogus-priv
1591
bogus-priv
1581
filterwin2k
1592
filterwin2k