Allow enable/disable IPv6

Signed-off-by: Alban Vidal <alban.vidal@zordhak.fr>
This commit is contained in:
Alban Vidal 2018-05-25 14:00:11 +00:00
parent d471127d73
commit 1b91fd0432
2 changed files with 11 additions and 3 deletions

View File

@ -44,6 +44,11 @@ RELOAD_PARAMATER=false
################################################################################
# Source paramaters
. $GIT_DIR/parameters.conf
################################################################################
# Function to request parameters
function func_read_param() {
# $1 => PARAM => Parameter name
@ -157,9 +162,10 @@ EOF
sed -i 's/.*delaycompress/#&/' /etc/logrotate.d/*
# Disable IPv6
if $DISABLE_IPv6 ; then
cat << EOF > /etc/sysctl.d/98-disable-ipv6.conf
# Disable ipv6 on all connexion
net.ipv6.conf.all.disable_ipv6 = 1
EOF
sysctl -p /etc/sysctl.d/98-disable-ipv6.conf
fi

2
parameters.conf Normal file
View File

@ -0,0 +1,2 @@
# Do you want disable IPv6 ?
DISABLE_IPv6=true