diff --git a/salt-pillar/cpe/aps.sls b/salt-pillar/cpe/aps.sls index 1477497..6535447 100644 --- a/salt-pillar/cpe/aps.sls +++ b/salt-pillar/cpe/aps.sls @@ -1945,6 +1945,7 @@ cpe: =PSjs -----END PGP MESSAGE----- model: Ubnt-UAP-nanoHD + error-led: "blue:dome" version: release location: "Saal A vorn" radios: @@ -2006,6 +2007,7 @@ cpe: =PSjs -----END PGP MESSAGE----- model: Ubnt-UAP-nanoHD + error-led: "blue:dome" version: release location: "Saal A mitte" radios: @@ -2067,6 +2069,7 @@ cpe: =PSjs -----END PGP MESSAGE----- model: Ubnt-UAP-nanoHD + error-led: "blue:dome" version: release location: "Saal A hinten" radios: @@ -2128,6 +2131,7 @@ cpe: =PSjs -----END PGP MESSAGE----- model: Ubnt-UAP-nanoHD + error-led: "blue:dome" version: release location: "Saal" radios: @@ -2189,6 +2193,7 @@ cpe: =PSjs -----END PGP MESSAGE----- model: Ubnt-UAP-nanoHD + error-led: "blue:dome" version: release location: "Saal A Kleiner Saal Tuer" radios: @@ -2250,6 +2255,7 @@ cpe: =PSjs -----END PGP MESSAGE----- model: Ubnt-UAP-nanoHD + error-led: "blue:dome" version: release location: "Saal A Kabinett" radios: @@ -2311,6 +2317,7 @@ cpe: =PSjs -----END PGP MESSAGE----- model: Ubnt-UAP-nanoHD + error-led: "blue:dome" version: release location: "Saal A Kleiner Saal Buehne" radios: diff --git a/salt/cpe/ap.sh b/salt/cpe/ap.sh index 8c7f45b..cf25cd8 100644 --- a/salt/cpe/ap.sh +++ b/salt/cpe/ap.sh @@ -462,8 +462,18 @@ else UP=n fi -[ \\\$REACHABLE = y ] && [ \\\$UP = n ] && wifi up -[ \\\$REACHABLE = n ] && [ \\\$UP = y ] && wifi down +if [ \\\$REACHABLE = y ] && [ \\\$UP = n ]; then +{%- 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 __SH__