updates for bookworm NetworkManager setup

This commit is contained in:
2026-03-10 10:03:15 -04:00
parent 926e7210bc
commit 7879d1dee0
4 changed files with 102 additions and 95 deletions

View File

@@ -9,19 +9,21 @@ then
exit 1
fi
source /etc/piwifiap.conf
source /etc/piwifiap/piwifiap.conf
if [ "$network_system" = "systemd-networkd" ]
then
systemctl stop hostapd
systemctl disable hostapd
elif [ "$network_system" = "NetworkManager" ]
then
nmcli con down piwifi-ap
nmcli con mod piwifi-ap autoconnect no
else
echo "Unable to determine what type of network configuration (systemd-networkd"
echo "or NetworkManager) your system uses."
echo "Cannot disable wireless access point."
exit 2
fi
case "$network_system" in
"systemd-networkd")
systemctl stop hostapd
systemctl disable hostapd
;;
"NetworkManager")
nmcli con down piwifi-hotspot
nmcli con mod piwifi-hotspot autoconnect no
;;
*)
echo "Unable to determine what type of network configuration (systemd-networkd"
echo "or NetworkManager) your system uses."
echo "Cannot disable wireless access point."
exit 2
;;
esac