babel checks for wlan1
This commit is contained in:
parent
c9e58f1852
commit
a3503aec30
|
@ -108,10 +108,16 @@ function mesh_babel {
|
||||||
echo 'fi' >> $babel_script
|
echo 'fi' >> $babel_script
|
||||||
echo '' >> $babel_script
|
echo '' >> $babel_script
|
||||||
echo 'IFACE=wlan0' >> $babel_script
|
echo 'IFACE=wlan0' >> $babel_script
|
||||||
echo 'IFACE_EXISTS=$(grep "$IFACE" /proc/net/dev)' >> $babel_script
|
echo 'if grep -q "wlan1" /proc/net/dev; then' >> $babel_script
|
||||||
|
echo ' IFACE=wlan1' >> $babel_script
|
||||||
|
echo 'fi' >> $babel_script
|
||||||
echo '' >> $babel_script
|
echo '' >> $babel_script
|
||||||
echo 'if [[ ! $IFACE_EXISTS || $1 == "stop" ]]; then' >> $babel_script
|
echo 'if [[ ! grep -q "$IFACE" /proc/net/dev || $1 == "stop" ]]; then' >> $babel_script
|
||||||
echo ' echo "Interface $IFACE was not found"' >> $babel_script
|
echo ' if ! grep -q "$IFACE" /proc/net/dev; then' >> $babel_script
|
||||||
|
echo ' echo "Interface $IFACE was not found"' >> $babel_script
|
||||||
|
echo ' else' >> $babel_script
|
||||||
|
echo ' echo "Stopping"' >> $babel_script
|
||||||
|
echo ' fi' >> $babel_script
|
||||||
echo ' ifconfig $IFACE down' >> $babel_script
|
echo ' ifconfig $IFACE down' >> $babel_script
|
||||||
echo ' pkill babeld' >> $babel_script
|
echo ' pkill babeld' >> $babel_script
|
||||||
echo ' if [ -f /bin/systemctl ]; then' >> $babel_script
|
echo ' if [ -f /bin/systemctl ]; then' >> $babel_script
|
||||||
|
|
Loading…
Reference in New Issue