Enable ipv6 when i2p is installed
This commit is contained in:
parent
1e687aa54f
commit
6a54a30e50
|
@ -265,7 +265,7 @@ function configure_internet_protocol {
|
|||
if ! grep -q "ignore pings" /etc/sysctl.conf; then
|
||||
echo '# ignore pings' >> /etc/sysctl.conf
|
||||
echo 'net.ipv4.icmp_echo_ignore_all = 1' >> /etc/sysctl.conf
|
||||
echo 'net.ipv6.icmp_echo_ignore_all = 1' >> /etc/sysctl.conf
|
||||
#echo 'net.ipv6.icmp_echo_ignore_all = 1' >> /etc/sysctl.conf
|
||||
fi
|
||||
if ! grep -q "disable ipv6" /etc/sysctl.conf; then
|
||||
echo '# disable ipv6' >> /etc/sysctl.conf
|
||||
|
|
|
@ -53,10 +53,24 @@ function install_i2p {
|
|||
echo "deb https://${I2P_DOMAIN}/ stretch main" > /etc/apt/sources.list.d/i2p.list
|
||||
echo "deb-src https://${I2P_DOMAIN}/ stretch main" >> /etc/apt/sources.list.d/i2p.list
|
||||
|
||||
# i2p needs ipv6 to be enabled
|
||||
sed -i 's|net.ipv6.conf.all.disable_ipv6.*|net.ipv6.conf.all.disable_ipv6 = 0|g' /etc/sysctl.conf
|
||||
/sbin/sysctl -p -q
|
||||
|
||||
apt-get update
|
||||
apt-get -yq install i2p i2p-keyring
|
||||
}
|
||||
|
||||
function remove_i2p {
|
||||
apt-get -yq remove i2p i2p-keyring --purge
|
||||
|
||||
# It's assumed here that ipv6 is only needed for i2p
|
||||
# This might not be true in future
|
||||
sed -i 's|net.ipv6.conf.all.disable_ipv6.*|net.ipv6.conf.all.disable_ipv6 = 1|g' /etc/sysctl.conf
|
||||
/sbin/sysctl -p -q
|
||||
}
|
||||
|
||||
function i2p_enable_sam {
|
||||
sed -i 's|clientApp.1.startOnLoad=.*|clientApp.1.startOnLoad=true|g' /var/lib/i2p/i2p-config/clients.config
|
||||
systemctl restart i2p
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue