mirror of
https://github.com/karl0ss/AnotterKiosk.git
synced 2025-07-28 03:00:16 +01:00
try again for wifi
This commit is contained in:
parent
b82615813d
commit
c133508f3c
@ -2,7 +2,7 @@
|
||||
# This script is being run on the target debian platform
|
||||
|
||||
apt update
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y lightdm openbox nginx php-fpm php-cli chromium autossh unclutter x11-xserver-utils xdotool htop nano openssh-server rsync x11vnc lm-sensors ntpdate scrot wireless-regdb fontconfig
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y lightdm openbox nginx php-fpm php-cli chromium autossh unclutter x11-xserver-utils xdotool htop nano openssh-server rsync x11vnc lm-sensors ntpdate scrot wireless-regdb fontconfig php-cli
|
||||
|
||||
rsync -a --chown=root:root "/kiosk_skeleton/." "/"
|
||||
|
||||
|
@ -1,15 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Configuring WiFi..."
|
||||
|
||||
WIFI_SSID=$(get-ini /boot/kioskbrowser.ini wifi ssid)
|
||||
WIFI_PSK=$(get-ini /boot/kioskbrowser.ini wifi psk)
|
||||
WIFI_COUNTRY=$(get-ini /boot/kioskbrowser.ini wifi country)
|
||||
|
||||
if [ -n "${WIFI_COUNTRY}" ]
|
||||
then
|
||||
if [ -n "${WIFI_COUNTRY}" ]; then
|
||||
echo "Setting WiFi country to ${WIFI_COUNTRY}"
|
||||
nmcli general reload conf-only
|
||||
fi
|
||||
|
||||
if [ -n "${WIFI_SSID}" ]
|
||||
then
|
||||
nmcli device wifi connect "${WIFI_SSID}" password "${WIFI_PSK}" || true
|
||||
if [ -n "${WIFI_SSID}" ]; then
|
||||
echo "Connecting to WiFi network: ${WIFI_SSID}"
|
||||
nmcli device wifi connect "${WIFI_SSID}" password "${WIFI_PSK}"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Successfully connected to ${WIFI_SSID}"
|
||||
else
|
||||
echo "Failed to connect to ${WIFI_SSID}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "No WiFi SSID configured. Skipping connection."
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user