From 6e9f1e29750f5229bdf6824a0157b448e43f595f Mon Sep 17 00:00:00 2001 From: Yuriy Date: Fri, 5 Jul 2024 23:28:44 -0400 Subject: [PATCH] disabled captive portal continuous ping --- Linux_Toolbox.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Linux_Toolbox.sh b/Linux_Toolbox.sh index e76a3d0..d7d6e4c 100755 --- a/Linux_Toolbox.sh +++ b/Linux_Toolbox.sh @@ -42,7 +42,7 @@ yadResults=$(yad \ --field "Grub Timeout:chk" \ --field Konsave:chk \ --field "Check for Flexo:chk" \ - --field '':chk \ + --field 'Disable Connectivity Check':chk \ --field "Updater to Desktop:chk" \ --field "Enable SSH:chk" \ --field '':chk \ @@ -210,6 +210,18 @@ if [[ $index -eq 17 ]] && [[ $i == *"TRUE"* ]]; then fi fi +if [[ $index -eq 18 ]] && [[ $i == *"TRUE"* ]]; then + file="/etc/NetworkManager/conf.d/20-connectivity.conf" + string="enabled=false" + + if grep -q "$string" "$file"; then + echo "Network Connectivity is already disabled" + else + echo "Network Connectivity is not disabled. Adding network config file" + echo '[connectivity]' | sudo tee -a /etc/NetworkManager/conf.d/20-connectivity.conf + echo 'enabled=false' | sudo tee -a /etc/NetworkManager/conf.d/20-connectivity.conf + fi +fi if [[ $index -eq 19 ]] && [[ $i == *"TRUE"* ]]; then