From e3debfa3fab51df5f46230b761a51a192e3f2850 Mon Sep 17 00:00:00 2001 From: starcalc Date: Tue, 30 Aug 2022 19:18:55 +0200 Subject: [PATCH] lastknownhostips access --- .drone.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 55aabbe..2a2cd54 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,10 +8,11 @@ steps: image: cburki/mosquitto-clients commands: - #mosquitto_sub -h raum.ctdo.de -t "homie/blinky1/\$localip" -C 1 + - rm -f lastknownhostips - cat hosts - for h in $(cat hosts); do echo $h; echo $h; done - for h in $(cat hosts); do mosquitto_sub -h raum.ctdo.de -t "homie/$h/\$localip" -C 1 | tr -d '\n'; done >lastknownips - - for h in $(cat hosts); do echo -n "$h,"; mosquitto_sub -h raum.ctdo.de -t "homie/$h/\$localip" -C 1 | tr -d '\n'; done >lastknownhostips + - for h in $(cat hosts); do echo -n "$h," >>lastknownhostips; mosquitto_sub -h raum.ctdo.de -t "homie/$h/\$localip" -C 1 | tr -d '\n' >>lastknownhostips; done # - mosquitto_sub -h raum.ctdo.de -t "homie/${HOST}/\$localip" -C 1 | tr -d '\n' # - mosquitto_sub -h raum.ctdo.de -t "homie/${HOST}/\$localip" -C 1 | tr -d '\n' >lastknownip - cat lastknownips