| Line 1... | 
            Line 1... | 
          
          
            | 1 | 
            #!/bin/bash
  | 
            1 | 
            #!/bin/bash
  | 
          
          
            | 2 | 
            #  $Id: alcasar.sh 1926 2016-06-05 20:34:25Z richard $ 
  | 
            2 | 
            #  $Id: alcasar.sh 1927 2016-06-05 21:36:32Z 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 1623... | 
            Line 1623... | 
          
          
            | 1623 | 
            # Bing - add 'adlt=strict'
  | 
            1623 | 
            # Bing - add 'adlt=strict'
  | 
          
          
            | 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
  | 
            - | 
               | 
          
          
            | 1629 | 
            # creation of the custom BL and WL categorie named "ossi" (for domain names & ip only)
  | 
            1628 | 
            # creation of the custom BL and WL categorie named "ossi" (for domain names & ip only)
  | 
          
          
            | 1630 | 
            	if [ "$mode" != "update" ]; then
  | 
            1629 | 
            	if [ "$mode" != "update" ]; then
  | 
          
          
            | - | 
               | 
            1630 | 
            		mkdir $DIR_DG/lists/blacklists/ossi-bl
  | 
          
          
            | 1631 | 
            		mkdir $DIR_DG/lists/blacklists/ossi-bl $DIR_DG/lists/blacklists/ossi-wl
  | 
            1631 | 
            		touch $DIR_DG/lists/blacklists/ossi-bl/domains
  | 
          
          
            | - | 
               | 
            1632 | 
            		mkdir $DIR_DG/lists/blacklists/ossi-wl
  | 
          
          
            | 1632 | 
            		touch $DIR_DG/lists/blacklists/ossi-bl/domain $DIR_DG/lists/blacklists/ossi-wl/domain
  | 
            1633 | 
            		touch $DIR_DG/lists/blacklists/ossi-wl/domains
  | 
          
          
            | 1633 | 
            # add custom ALCASAR BL files (TOR)
  | 
            1634 | 
            # add custom ALCASAR BL files
  | 
          
          
            | - | 
               | 
            1635 | 
            		for x in $(ls -1 $DIR_CONF/etc/ | grep "^ossi-*")
  | 
          
          
            | - | 
               | 
            1636 | 
            		do
  | 
          
          
            | 1634 | 
            		mkdir $DIR_DG/lists/blacklists/ossi-tor_node
  | 
            1637 | 
            			mkdir $DIR_DG/lists/blacklists/$x
  | 
          
          
            | 1635 | 
            		mv $DIR_CONF/ossi-tor_node  $DIR_DG/lists/blacklists/ossi-tor_node/domain
  | 
            1638 | 
            			cp $DIR_CONF/etc/$x  $DIR_DG/lists/blacklists/$x/domains
  | 
          
          
            | - | 
               | 
            1639 | 
            		done
  | 
          
          
            | 1636 | 
            		chown -R dansguardian:apache $DIR_DG $DIR_DEST_SHARE
  | 
            1640 | 
            		chown -R dansguardian:apache $DIR_DG $DIR_DEST_SHARE
  | 
          
          
            | 1637 | 
            		chmod -R g+rw $DIR_DG $DIR_DEST_SHARE
  | 
            1641 | 
            		chmod -R g+rw $DIR_DG $DIR_DEST_SHARE
  | 
          
          
            | - | 
               | 
            1642 | 
            # adapt the Toulouse BL to ALCASAR architecture
  | 
          
          
            | 1638 | 
            		$DIR_DEST_BIN/alcasar-bl.sh --adapt
  | 
            1643 | 
            		$DIR_DEST_BIN/alcasar-bl.sh --adapt
  | 
          
          
            | 1639 | 
            # enable the default categories
  | 
            1644 | 
            # enable the default categories
  | 
          
          
            | 1640 | 
            		$DIR_DEST_BIN/alcasar-bl.sh --cat_choice
  | 
            1645 | 
            		$DIR_DEST_BIN/alcasar-bl.sh --cat_choice
  | 
          
          
            | 1641 | 
            	fi
  | 
            1646 | 
            	fi
  | 
          
          
            | 1642 | 
            }
  | 
            1647 | 
            }
  |