Corretto bug che impediva la pubblicazione del topic mqtt per ogni evento
This commit is contained in:
@@ -94,10 +94,12 @@ function trigger_event {
|
||||
local ec=$?
|
||||
#echo "$EVENT ec=$ec" >> /tmp/piGarden.testevent
|
||||
|
||||
CURRENT_EVENT="$EVENT"
|
||||
mqtt_status &
|
||||
#CURRENT_EVENT="$EVENT"
|
||||
#mqtt_status &
|
||||
|
||||
if [ $ec -ne 0 ]; then
|
||||
CURRENT_EVENT="$EVENT"
|
||||
mqtt_status &
|
||||
log_write "Stop events chain for exit code $ec in $current_event_dir/$f"
|
||||
return $ec
|
||||
fi
|
||||
@@ -106,6 +108,9 @@ function trigger_event {
|
||||
|
||||
fi
|
||||
|
||||
CURRENT_EVENT="$EVENT"
|
||||
mqtt_status &
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user