Files
C_C++
Haskell
Java
LaTeX
Misc.
avalonia_hw
bash_history_abuse
cmdtest
cross_compile
gdb_pretty_print
my_git_repo
rasterpython_eremias++
terribly_old_scripts
aslr-set
bashrc-backup.sh
bashrc-load.sh
escspace
filimg
gif2a
history-backup.sh
imgNamer
inputrc-backup.sh
ipv6-get
ipv6-toggle
mkcpp
mkhtml
a.kts
bind_test.sh
cafebabe
ceasar.adb
cluster.dot
cluster.png
comprehensions.adb
crasher.puml
dot.dot
elif_problem.eax
embeded_bake.md
example.m4
extension_cut.Makefile
fizzbuzz.f90
girl_vs_pig_scrapper.py
gitea_mass_create.sh
guards.hs
guitarist.puml
hello.pl
hw.pl
i.sixel
man2png
nesting.puml
opener.c
script_help_for_xolatile.sh
strategy.cs
test.info
test.texi
top_level.cs
Python
Vim
Webdev
git
.gitignore
Makefile
tests/Misc./terribly_old_scripts/ipv6-toggle

14 lines
356 B
Bash
Executable File

#!/bin/bash
# Flip kerner ipv6 enabled status
fgrep 0 /proc/sys/net/ipv6/conf/all/disable_ipv6 &> /dev/null
if [ $? == "0" ]; then
sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
echo "IPv6 connections are now disabled."
else
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
echo "IPv6 connections are now enabled."
fi