Rebuilt the network view in Svelte
This commit is contained in:
@@ -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
|
||||
|
||||
}
|
||||
|
||||
3
scripts/download-dependencies.sh
Executable file
3
scripts/download-dependencies.sh
Executable 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
0
scripts/edit-boot-config
Normal file → Executable file
0
scripts/edit-config
Normal file → Executable file
0
scripts/edit-config
Normal file → Executable 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.
@@ -1,5 +1,3 @@
|
||||
hostinfo.sh &
|
||||
|
||||
ratpoison &
|
||||
|
||||
xset -dpms
|
||||
|
||||
Reference in New Issue
Block a user