distribution/packages/jelos/sources/scripts/toggle-ipv6

17 lines
467 B
Text
Raw Normal View History

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2023-present - The JELOS Project (https://github.com/JustEnoughLinuxOS)
. /etc/profile
if [ "$(get_setting ipv6.enabled)" == "1" ]
2023-01-15 00:39:50 +00:00
then
sysctl net.ipv6.conf.all.disable_ipv6=0
sysctl net.ipv6.conf.default.disable_ipv6=0
sysctl net.ipv6.conf.lo.disable_ipv6=0
2023-01-15 00:11:30 +00:00
else
sysctl net.ipv6.conf.all.disable_ipv6=1
sysctl net.ipv6.conf.default.disable_ipv6=1
sysctl net.ipv6.conf.lo.disable_ipv6=1
fi