Skip to content

Commit 0a30186

Browse files
Merge pull request #277 from andrewjfreyer/beta
0.2.198
2 parents cf38a8d + 30d74fd commit 0a30186

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
.DS_Store

monitor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# ----------------------------------------------------------------------------------------
2626

2727
#VERSION NUMBER
28-
export version=0.2.197
28+
export version=0.2.198
2929

3030
#COLOR OUTPUT FOR RICH OUTPUT
3131
ORANGE=$'\e[1;33m'

support/mqtt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,11 @@ mqtt_error_handler () {
163163

164164
if [ -n "$received" ]; then
165165
#ERRORS
166-
[[ ${received^^} =~ .*REFUSED.* ]] && return_value=1 && print_message="mqtt broker refused connection - check username, password, and host address"
167-
[[ ${received^^} =~ .*NETWORK.* ]] && return_value=0 && print_message="network is down. enqueuing command to try again after a delay"
168-
[[ ${received^^} =~ .*"LOOKUP ERROR".* ]] && return_value=0 && print_message="issue connecting to mqtt server (lookup error). enqueuing command to try again after a delay"
166+
[[ ${received^^} =~ .*NO ROUTE TO HOST.* ]] && return_value=1 && print_message="networking errors, no route to host - check username, password, and host address"
167+
[[ ${received^^} =~ .*CONNECTION REFUSED.* ]] && return_value=1 && print_message="mqtt broker refused connection - check username, password, and host address"
168+
[[ ${received^^} =~ .*NETWORK.* ]] && [[ ${received^^} =~ .*UNREACHABLE.* ]] && return_value=0 && print_message="network is down. enqueuing command to try again after a delay"
169+
[[ ${received^^} =~ .*LOOKUP ERROR.* ]] && return_value=0 && print_message="issue connecting to mqtt server (lookup error). enqueuing command to try again after a delay"
170+
169171

170172
if [ -n "$last_error_message" ] && [ "$last_error_message" == "$print_message" ]; then
171173
#HERE, WE HAVE A REPEATED ERROR

0 commit comments

Comments
 (0)