Rebuilt the network view in Svelte

This commit is contained in:
David Carley
2022-07-04 16:19:23 -07:00
parent 10df5ada62
commit 9710d56779
52 changed files with 11186 additions and 867 deletions

View File

@@ -18,20 +18,23 @@ function query_config() {
if [ -e $WLAN0_CFG ]; then
SSID=$(grep wpa-ssid $WLAN0_CFG |
sed 's/^[[:space:]]*wpa-ssid "\([^"]*\)"/\1/')
echo "{\"ssid\": \"$SSID\", \"mode\": \"client\"}"
# echo "{\"ssid\": \"$SSID\", \"mode\": \"client\"}"
echo "{\"ssid\": \"$SSID\"}"
else
if [ -e $HOSTAPD_CFG -a -e /etc/default/hostapd ]; then
SSID=$(grep ^ssid= $HOSTAPD_CFG | sed 's/^ssid=\(.*\)$/\1/')
CHANNEL=$(grep ^channel= $HOSTAPD_CFG |
sed 's/^channel=\(.*\)$/\1/')
# if [ -e $HOSTAPD_CFG -a -e /etc/default/hostapd ]; then
# SSID=$(grep ^ssid= $HOSTAPD_CFG | sed 's/^ssid=\(.*\)$/\1/')
# CHANNEL=$(grep ^channel= $HOSTAPD_CFG |
# sed 's/^channel=\(.*\)$/\1/')
echo -n "{\"ssid\": \"$SSID\", "
echo "\"channel\": $CHANNEL, \"mode\": \"ap\"}"
# echo -n "{\"ssid\": \"$SSID\", "
# echo "\"channel\": $CHANNEL, \"mode\": \"ap\"}"
else
echo "{\"mode\": \"disabled\"}"
fi
# else
# echo "{\"mode\": \"disabled\"}"
# fi
echo "{}"
fi
}

View File

@@ -0,0 +1,3 @@
#!/bin/bash -ex
pip3 download -d python-packages -r requirements.txt

0
scripts/edit-boot-config Normal file → Executable file
View File

0
scripts/edit-config Normal file → Executable file
View File

View File

@@ -121,19 +121,21 @@ fi
# Install rc.local
cp scripts/rc.local /etc/
# Ensure that the watchdog python library is installed
pip3 list --format=columns | grep watchdog >/dev/null
if [ $? -ne 0 ]; then
pip3 install scripts/pathtools-0.1.2.tar.gz scripts/watchdog-v0.10.6.tar.gz
fi
# Install bbctrl
if $UPDATE_PY; then
service bbctrl stop
rm -rf /usr/local/lib/python*/dist-packages/bbctrl-*
# Ensure python dependencies are installed
pip3 install --no-index --find-links python-packages -r requirements.txt
./setup.py install --force
service bbctrl restart
HTTP_DIR=$(find /usr/local/lib/ -type d -name "http")
chmod 777 $HTTP_DIR
service bbctrl restart
fi
# Expand the file system if necessary

Binary file not shown.

Binary file not shown.

View File

@@ -1,5 +1,3 @@
hostinfo.sh &
ratpoison &
xset -dpms