disabled captive portal continuous ping

This commit is contained in:
Yuriy 2024-07-05 23:28:44 -04:00
parent b2a1199642
commit 6e9f1e2975

View File

@ -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