Subversion Repositories ALCASAR

Rev

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

Rev 923 Rev 933
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 923 2012-07-03 06:34:18Z franck $ 
2
#  $Id: alcasar.sh 933 2012-07-05 15:57:15Z franck $ 
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 1259... Line 1259...
1259
# Start and stop a 2nd process for the "DNS blackhole"
1259
# Start and stop a 2nd process for the "DNS blackhole"
1260
$SED "/daemon/a \$dnsmasq -C /etc/dnsmasq-blackhole.conf \$OPTIONS" /etc/init.d/dnsmasq
1260
$SED "/daemon/a \$dnsmasq -C /etc/dnsmasq-blackhole.conf \$OPTIONS" /etc/init.d/dnsmasq
1261
$SED "/killproc \$DAEMON_NAME/a killproc \$DAEMON_NAME" /etc/init.d/dnsmasq
1261
$SED "/killproc \$DAEMON_NAME/a killproc \$DAEMON_NAME" /etc/init.d/dnsmasq
1262
# Start after chilli (65) which create tun0
1262
# Start after chilli (65) which create tun0
1263
$SED "s?^# chkconfig:.*?# chkconfig: 2345 99 40?g" /etc/init.d/dnsmasq
1263
$SED "s?^# chkconfig:.*?# chkconfig: 2345 99 40?g" /etc/init.d/dnsmasq
1264
# Optionnellement on active les logs DNS des clients
1264
# Optionnellement on pré-active les logs DNS des clients
1265
[ -e /etc/sysconfig/dnsmasq.default ] || cp /etc/sysconfig/dnsmasq /etc/sysconfig/dnsmasq.default
1265
[ -e /etc/sysconfig/dnsmasq.default ] || cp /etc/sysconfig/dnsmasq /etc/sysconfig/dnsmasq.default
1266
$SED "s?^OPTIONS=.*?#OPTIONS=\"-q --log-facility=/var/log/dnsmasq/queries.log\"?g"  /etc/sysconfig/dnsmasq
1266
$SED "s?log-facility?#OPTIONS=\"-q --log-facility=/var/log/dnsmasq/queries.log\"?g"  /etc/sysconfig/dnsmasq
-
 
1267
# Optionnellement, exemple de configuration avec un A.D.
-
 
1268
echo '#OPTIONS="$OPTIONS --server=/your-domain/192.168.182.2"' >> /etc/sysconfig/dnsmasq
1267
} # End dnsmasq
1269
} # End dnsmasq
1268
 
1270
 
1269
##########################################################
1271
##########################################################
1270
##		Fonction BL (BlackList)			##
1272
##		Fonction BL (BlackList)			##
1271
##########################################################
1273
##########################################################