mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Removing hotspot script in favor of UI toggle.
This commit is contained in:
parent
58562f07b5
commit
22a6d24c27
2 changed files with 1 additions and 65 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue