Subversion Repositories ALCASAR

Rev

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

Rev 1924 Rev 1925
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 1924 2016-06-04 12:52:49Z richard $ 
2
#  $Id: alcasar.sh 1925 2016-06-04 18:38:51Z 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 1624... Line 1624...
1624
#"(^http://[0-9a-z]+\.bing\.[a-z]+[-/%.0-9a-z]*\?)(.*)"->"\1\2&adlt=strict"
1624
#"(^http://[0-9a-z]+\.bing\.[a-z]+[-/%.0-9a-z]*\?)(.*)"->"\1\2&adlt=strict"
1625
EOF
1625
EOF
1626
# change the google safesearch ("safe=strict" instead of "safe=vss")
1626
# change the google safesearch ("safe=strict" instead of "safe=vss")
1627
	$SED "s?safe=vss?safe=strict?g" $DIR_DG/lists/urlregexplist
1627
	$SED "s?safe=vss?safe=strict?g" $DIR_DG/lists/urlregexplist
1628
# adapt the Toulouse BL to ALCASAR architecture
1628
# adapt the Toulouse BL to ALCASAR architecture
1629
	if [ "$mode" != "update" ]; then
-
 
1630
		$DIR_DEST_BIN/alcasar-bl.sh --adapt
-
 
1631
# enable the default categories
-
 
1632
		$DIR_DEST_BIN/alcasar-bl.sh --cat_choice
-
 
1633
# creation of the custom BL and WL categorie named "ossi" (for domain names & ip only)
1629
# creation of the custom BL and WL categorie named "ossi" (for domain names & ip only)
-
 
1630
	if [ "$mode" != "update" ]; then
1634
		mkdir $DIR_DG/lists/blacklists/ossi-bl $DIR_DG/lists/blacklists/ossi-wl
1631
		mkdir $DIR_DG/lists/blacklists/ossi-bl $DIR_DG/lists/blacklists/ossi-wl
1635
		touch $DIR_DG/lists/blacklists/ossi-bl/domain $DIR_DG/lists/blacklists/ossi-wl/domain
1632
		touch $DIR_DG/lists/blacklists/ossi-bl/domain $DIR_DG/lists/blacklists/ossi-wl/domain
1636
# add custom ALCASAR BL files (TOR)
1633
# add custom ALCASAR BL files (TOR)
1637
		mkdir $DIR_DG/lists/blacklists/ossi-tor_node
1634
		mkdir $DIR_DG/lists/blacklists/ossi-tor_node
1638
		mv $DIR_CONF/ossi-tor_node  $DIR_DG/lists/blacklists/ossi-tor_node/domain
1635
		mv $DIR_CONF/ossi-tor_node  $DIR_DG/lists/blacklists/ossi-tor_node/domain
1639
		chown -R dansguardian:apache $DIR_DG $DIR_DEST_SHARE
1636
		chown -R dansguardian:apache $DIR_DG $DIR_DEST_SHARE
1640
		chmod -R g+rw $DIR_DG $DIR_DEST_SHARE
1637
		chmod -R g+rw $DIR_DG $DIR_DEST_SHARE
-
 
1638
		$DIR_DEST_BIN/alcasar-bl.sh --adapt
-
 
1639
# enable the default categories
-
 
1640
		$DIR_DEST_BIN/alcasar-bl.sh --cat_choice
1641
	fi
1641
	fi
1642
}
1642
}
1643
 
1643
 
1644
##########################################################
1644
##########################################################
1645
##		Fonction "cron"				##
1645
##		Fonction "cron"				##