ipfailover - user check script overrides default
When the user supplies a check script, that check script replaces the
default check script.
bug bz1410721
@@ -44,6 +44,8 @@ function generate_global_config() {
#
# Generate VRRP checker script configuration section.
+# When a check script is provided use it instead of default script
+# The default script is suppressed When port is 0
#
# Example:
# generate_script_config
@@ -56,14 +58,15 @@ function generate_script_config() {
echo ""
echo "vrrp_script ${CHECK_SCRIPT_NAME} {"
+ if [[ -n "${HA_CHECK_SCRIPT}" ]]; then
+ echo " script \"${HA_CHECK_SCRIPT}\""
+ else
if [[ "${port}" == "0" ]]; then
echo " script \"true\""
else
- if [[ -n "${HA_CHECK_SCRIPT}" ]]; then
- echo " script \"${HA_CHECK_SCRIPT}\""
- fi
echo " script \"</dev/tcp/${serviceip}/${port}\""
fi
+ fi
echo " interval ${CHECK_INTERVAL_SECS}"
echo "}"
@@ -165,8 +168,6 @@ function generate_vip_section() {
#
# Generate vrrpd instance configuration section.
-# This generates the vrrp_sync_group and vrrp_instance
-# There is one VIP per vrrp_sync_group
#
# Examples:
# generate_vrrpd_instance_config arp 1 "10.1.2.3" enp0s8 "252" "master"
