Allow enable/disable IPv6
Signed-off-by: Alban Vidal <alban.vidal@zordhak.fr>
This commit is contained in:
parent
d471127d73
commit
1b91fd0432
@ -44,6 +44,11 @@ RELOAD_PARAMATER=false
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
# Source paramaters
|
||||||
|
. $GIT_DIR/parameters.conf
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
# Function to request parameters
|
# Function to request parameters
|
||||||
function func_read_param() {
|
function func_read_param() {
|
||||||
# $1 => PARAM => Parameter name
|
# $1 => PARAM => Parameter name
|
||||||
@ -157,9 +162,10 @@ EOF
|
|||||||
sed -i 's/.*delaycompress/#&/' /etc/logrotate.d/*
|
sed -i 's/.*delaycompress/#&/' /etc/logrotate.d/*
|
||||||
|
|
||||||
# Disable IPv6
|
# Disable IPv6
|
||||||
|
if $DISABLE_IPv6 ; then
|
||||||
cat << EOF > /etc/sysctl.d/98-disable-ipv6.conf
|
cat << EOF > /etc/sysctl.d/98-disable-ipv6.conf
|
||||||
# Disable ipv6 on all connexion
|
# Disable ipv6 on all connexion
|
||||||
net.ipv6.conf.all.disable_ipv6 = 1
|
net.ipv6.conf.all.disable_ipv6 = 1
|
||||||
EOF
|
EOF
|
||||||
sysctl -p /etc/sysctl.d/98-disable-ipv6.conf
|
sysctl -p /etc/sysctl.d/98-disable-ipv6.conf
|
||||||
|
fi
|
||||||
|
2
parameters.conf
Normal file
2
parameters.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Do you want disable IPv6 ?
|
||||||
|
DISABLE_IPv6=true
|
Loading…
Reference in New Issue
Block a user