Initial Commit

This commit is contained in:
2026-03-06 07:37:37 -05:00
parent 2e42bfdbff
commit f54b665718
13 changed files with 359 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#!/bin/bash
# Enable PiWifiAP wireless access point
current_user=`whoami`
if [ "$current_user" != "root" ]
then
echo "You must have root privileges to run this setup."
echo "Try 'sudo $0'"
exit 1
fi
source /etc/piwifiap.conf
if [ "$network_system" = "systemd-networkd" ]
then
systemctl enable hostapd
systemctl start hostapd
elif [ "$network_system" = "NetworkManager" ]
then
nmcli con mod piwifi-ap autoconnect yes
nmcli con up piwifi-ap
else
echo "Unable to determine what type of network configuration (systemd-networkd"
echo "or NetworkManager) your system uses."
echo "Cannot enable wireless access point."
exit 2
fi