Line 1... |
Line 1... |
1 |
#/bin/bash
|
1 |
#/bin/bash
|
2 |
# $Id: alcasar-conf.sh 1015 2013-01-27 22:43:29Z richard $
|
2 |
# $Id: alcasar-conf.sh 1020 2013-02-04 23:10:46Z franck $
|
3 |
|
3 |
|
4 |
# alcasar-conf.sh
|
4 |
# alcasar-conf.sh
|
5 |
# by REXY
|
5 |
# by REXY
|
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 386... |
Line 386... |
386 |
do
|
386 |
do
|
387 |
$SED "/^server=/d" $i
|
387 |
$SED "/^server=/d" $i
|
388 |
echo "server=$DNS1" >> $i
|
388 |
echo "server=$DNS1" >> $i
|
389 |
echo "server=$DNS2" >> $i
|
389 |
echo "server=$DNS2" >> $i
|
390 |
done
|
390 |
done
|
- |
|
391 |
$SED "s?^dhcp-range=.*?dhcp-range=$PRIVATE_IP,192.168.180.254,$PRIVATE_NETMASK,12h?g" /etc/dnsmasq.conf
|
391 |
$SED "s?^dhcp-option=option:router.*?dhcp-option=option:router,$PRIVATE_IP?g" /etc/dnsmasq.conf
|
392 |
$SED "s?^dhcp-option=option:router.*?dhcp-option=option:router,$PRIVATE_IP?g" /etc/dnsmasq.conf
|
392 |
# DG + BL
|
393 |
# DG + BL
|
393 |
$SED "s?^filterip.*?filterip = $PRIVATE_IP?g" /etc/dansguardian/dansguardian.conf
|
394 |
$SED "s?^filterip.*?filterip = $PRIVATE_IP?g" /etc/dansguardian/dansguardian.conf
|
394 |
# Watchdog
|
395 |
# Watchdog
|
395 |
$SED "s?^PRIVATE_IP=.*?PRIVATE_IP=\"$PRIVATE_IP\"?g" $DIR_BIN/alcasar-watchdog.sh
|
396 |
$SED "s?^PRIVATE_IP=.*?PRIVATE_IP=\"$PRIVATE_IP\"?g" $DIR_BIN/alcasar-watchdog.sh
|
396 |
# SSHD
|
397 |
# SSHD
|
- |
|
398 |
$SED "?^ListenAddress?d" /etc/ssh/sshd_config
|
397 |
$SED "s?^#ListenAddress 0\.0\.0\.0?ListenAddress $PRIVATE_IP?g" /etc/ssh/sshd_config
|
399 |
# $SED "s?^#ListenAddress 0\.0\.0\.0?ListenAddress $PRIVATE_IP?g" /etc/ssh/sshd_config
|
- |
|
400 |
$SED "/#ListenAddress.*/a\ListenAddress $PUBLIC_IP" /etc/ssh/sshd_config
|
398 |
$SED "/^ListenAddress $PRIVATE_IP/a\ListenAddress $PUBLIC_IP" /etc/ssh/sshd_config
|
401 |
$SED "/ListenAddress $PUBLIC_IP/a\ListenAddress $PRIVATE_IP" /etc/ssh/sshd_config
|
399 |
# Prompts
|
402 |
# Prompts
|
400 |
$SED "s?^ORGANISME.*?ORGANISME=$ORGANISME?g" /etc/bashrc
|
403 |
$SED "s?^ORGANISME.*?ORGANISME=$ORGANISME?g" /etc/bashrc
|
401 |
# sudoers
|
404 |
# sudoers
|
402 |
$SED "s?^Host_Alias.*?Host_Alias LAN_ORG=$PRIVATE_NETWORK/$PRIVATE_NETMASK,localhost #réseau de l'organisme?g" /etc/sudoers
|
405 |
$SED "s?^Host_Alias.*?Host_Alias LAN_ORG=$PRIVATE_NETWORK/$PRIVATE_NETMASK,localhost #réseau de l'organisme?g" /etc/sudoers
|
403 |
# Services start
|
406 |
# Services start
|