From 22a6d24c27dd06f563d50b1945cd23f602aaa097 Mon Sep 17 00:00:00 2001 From: Roland Date: Mon, 7 Feb 2022 14:48:53 -0700 Subject: [PATCH] Removing hotspot script in favor of UI toggle. --- install.sh | 5 +--- scripts/hotspot.sh | 61 ---------------------------------------------- 2 files changed, 1 insertion(+), 65 deletions(-) delete mode 100644 scripts/hotspot.sh diff --git a/install.sh b/install.sh index 5fcff407..b20c97ee 100755 --- a/install.sh +++ b/install.sh @@ -114,12 +114,9 @@ sudo -u postgres psql -c '\l' | grep wrolpi || ( sudo -u postgres psql -c "alter user wrolpi password 'wrolpi'" && sudo -u postgres createdb -O wrolpi wrolpi ) -# Init/upgrade the WROLPi database. +# Initialize/upgrade the WROLPi database. (cd /opt/wrolpi && /usr/bin/python3 /opt/wrolpi/main.py db upgrade) -# Configure the hotspot. -bash /opt/wrolpi/scripts/hotspot.sh - set +x ip=$(hostname -i | cut -d' ' -f1) diff --git a/scripts/hotspot.sh b/scripts/hotspot.sh deleted file mode 100644 index 9db51272..00000000 --- a/scripts/hotspot.sh +++ /dev/null @@ -1,61 +0,0 @@ -#! /usr/bin/env bash -# Configure the WROLPi hotspot. -set -x -set -e - -apt install -y network-manager - -cat >/etc/netplan/50-cloud-init.yaml <<'EOF' -# This file is generated from information provided by the datasource. Changes -# to it will not persist across an instance reboot. To disable cloud-init's -# network configuration capabilities, write a file -# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: -# network: {config: disabled} -network: - version: 2 - renderer: NetworkManager -EOF - -cat >/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg <<'EOF' -network: {config: disabled} -EOF - -netplan generate -netplan apply - -# Initialize the Hotspot config, then overwrite it. -nmcli con add type wifi ifname wlan0 con-name Hotspot autoconnect yes ssid WROLPi -cat >/etc/NetworkManager/system-connections/Hotspot.nmconnection <<'EOF' -[connection] -id=Hotspot -uuid=b72ae32e-877c-4559-aaa1-e41a7a9d7bd5 -type=wifi -interface-name=wlan0 -permissions= -timestamp=1635780305 - -[wifi] -band=bg -mac-address-blacklist= -mode=ap -seen-bssids=DC:A6:32:C7:01:EE; -ssid=WROLPi - -[wifi-security] -key-mgmt=wpa-psk -psk=wrolpi hotspot - -[ipv4] -address1=192.168.0.1/24,192.168.0.1 -dns-search= -method=shared - -[ipv6] -addr-gen-mode=stable-privacy -dns-search= -method=auto - -[proxy] -EOF - -systemctl restart NetworkManager.service