diff options
author | ache <ache@ache.one> | 2024-03-13 11:41:34 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2024-03-13 11:42:07 +0100 |
commit | 129ae282b9ed8fdc04ee53ccf7172d3a4a8ea7e4 (patch) | |
tree | 082d4115dbe12ffb245cd70e6e3efb931909e52e /functions | |
parent | Cuda option (diff) |
Diffstat (limited to 'functions')
-rw-r--r-- | functions/ipv6-ctrl.fish | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/functions/ipv6-ctrl.fish b/functions/ipv6-ctrl.fish new file mode 100644 index 0000000..fee246a --- /dev/null +++ b/functions/ipv6-ctrl.fish @@ -0,0 +1,9 @@ +function ipv6-ctrl --description 'Disable or enable IPv6 support.' + if [ $(sysctl -n net.ipv6.conf.all.disable_ipv6) -eq "0" ]; + sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 + sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1 + else; + sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0 + sudo sysctl -w net.ipv6.conf.default.disable_ipv6=0 + end +end |