forked from zentralwerk/network
cpe: add error-led to wifi-on-link.sh cronjob
This commit is contained in:
parent
51522c28dc
commit
381640d681
|
@ -1945,6 +1945,7 @@ cpe:
|
||||||
=PSjs
|
=PSjs
|
||||||
-----END PGP MESSAGE-----
|
-----END PGP MESSAGE-----
|
||||||
model: Ubnt-UAP-nanoHD
|
model: Ubnt-UAP-nanoHD
|
||||||
|
error-led: "blue:dome"
|
||||||
version: release
|
version: release
|
||||||
location: "Saal A vorn"
|
location: "Saal A vorn"
|
||||||
radios:
|
radios:
|
||||||
|
@ -2006,6 +2007,7 @@ cpe:
|
||||||
=PSjs
|
=PSjs
|
||||||
-----END PGP MESSAGE-----
|
-----END PGP MESSAGE-----
|
||||||
model: Ubnt-UAP-nanoHD
|
model: Ubnt-UAP-nanoHD
|
||||||
|
error-led: "blue:dome"
|
||||||
version: release
|
version: release
|
||||||
location: "Saal A mitte"
|
location: "Saal A mitte"
|
||||||
radios:
|
radios:
|
||||||
|
@ -2067,6 +2069,7 @@ cpe:
|
||||||
=PSjs
|
=PSjs
|
||||||
-----END PGP MESSAGE-----
|
-----END PGP MESSAGE-----
|
||||||
model: Ubnt-UAP-nanoHD
|
model: Ubnt-UAP-nanoHD
|
||||||
|
error-led: "blue:dome"
|
||||||
version: release
|
version: release
|
||||||
location: "Saal A hinten"
|
location: "Saal A hinten"
|
||||||
radios:
|
radios:
|
||||||
|
@ -2128,6 +2131,7 @@ cpe:
|
||||||
=PSjs
|
=PSjs
|
||||||
-----END PGP MESSAGE-----
|
-----END PGP MESSAGE-----
|
||||||
model: Ubnt-UAP-nanoHD
|
model: Ubnt-UAP-nanoHD
|
||||||
|
error-led: "blue:dome"
|
||||||
version: release
|
version: release
|
||||||
location: "Saal"
|
location: "Saal"
|
||||||
radios:
|
radios:
|
||||||
|
@ -2189,6 +2193,7 @@ cpe:
|
||||||
=PSjs
|
=PSjs
|
||||||
-----END PGP MESSAGE-----
|
-----END PGP MESSAGE-----
|
||||||
model: Ubnt-UAP-nanoHD
|
model: Ubnt-UAP-nanoHD
|
||||||
|
error-led: "blue:dome"
|
||||||
version: release
|
version: release
|
||||||
location: "Saal A Kleiner Saal Tuer"
|
location: "Saal A Kleiner Saal Tuer"
|
||||||
radios:
|
radios:
|
||||||
|
@ -2250,6 +2255,7 @@ cpe:
|
||||||
=PSjs
|
=PSjs
|
||||||
-----END PGP MESSAGE-----
|
-----END PGP MESSAGE-----
|
||||||
model: Ubnt-UAP-nanoHD
|
model: Ubnt-UAP-nanoHD
|
||||||
|
error-led: "blue:dome"
|
||||||
version: release
|
version: release
|
||||||
location: "Saal A Kabinett"
|
location: "Saal A Kabinett"
|
||||||
radios:
|
radios:
|
||||||
|
@ -2311,6 +2317,7 @@ cpe:
|
||||||
=PSjs
|
=PSjs
|
||||||
-----END PGP MESSAGE-----
|
-----END PGP MESSAGE-----
|
||||||
model: Ubnt-UAP-nanoHD
|
model: Ubnt-UAP-nanoHD
|
||||||
|
error-led: "blue:dome"
|
||||||
version: release
|
version: release
|
||||||
location: "Saal A Kleiner Saal Buehne"
|
location: "Saal A Kleiner Saal Buehne"
|
||||||
radios:
|
radios:
|
||||||
|
|
|
@ -462,8 +462,18 @@ else
|
||||||
UP=n
|
UP=n
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ \\\$REACHABLE = y ] && [ \\\$UP = n ] && wifi up
|
if [ \\\$REACHABLE = y ] && [ \\\$UP = n ]; then
|
||||||
[ \\\$REACHABLE = n ] && [ \\\$UP = y ] && wifi down
|
{%- if conf.get("error-led") %}
|
||||||
|
echo 0 > /sys/class/leds/{{ conf["error-led"] }}/brightness
|
||||||
|
{%- endif %}
|
||||||
|
wifi up
|
||||||
|
fi
|
||||||
|
if [ \\\$REACHABLE = n ] && [ \\\$UP = y ];
|
||||||
|
{%- if conf.get("error-led") %}
|
||||||
|
echo 1 > /sys/class/leds/{{ conf["error-led"] }}/brightness
|
||||||
|
{%- endif %}
|
||||||
|
wifi down
|
||||||
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
__SH__
|
__SH__
|
||||||
|
|
Loading…
Reference in New Issue