This makes the logic more obvious.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
}
service_fail_limit=2
-service_tcp_ports=21
loadconfig
;;
monitor)
- if [ -n "$service_tcp_ports" ] ; then
- if ctdb_check_tcp_ports $service_tcp_ports ; then
+ if ctdb_check_tcp_ports 21 ; then
ctdb_counter_init
- else
+ else
ctdb_counter_incr
ctdb_check_counter
ctdb_check_counter "quiet" -ge 1 || \
- echo "WARNING: vsftpd not listening but less than $service_fail_limit consecutive failures, not unhealthy yet"
- fi
- fi
+ echo "WARNING: vsftpd not listening but less than $service_fail_limit consecutive failures, not unhealthy yet"
+ fi
;;
esac