File tree 1 file changed +8
-7
lines changed
images/ipfailover/keepalived/lib
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ function generate_global_config() {
44
44
45
45
#
46
46
# Generate VRRP checker script configuration section.
47
+ # When a check script is provided use it instead of default script
48
+ # The default script is suppressed When port is 0
47
49
#
48
50
# Example:
49
51
# generate_script_config
@@ -56,13 +58,14 @@ function generate_script_config() {
56
58
echo " "
57
59
echo " vrrp_script ${CHECK_SCRIPT_NAME} {"
58
60
59
- if [[ " ${port} " == " 0 " ]]; then
60
- echo " script \" true \" "
61
+ if [[ -n " ${HA_CHECK_SCRIPT} " ]]; then
62
+ echo " script \" ${HA_CHECK_SCRIPT} \" "
61
63
else
62
- if [[ -n " ${HA_CHECK_SCRIPT} " ]]; then
63
- echo " script \" ${HA_CHECK_SCRIPT} \" "
64
+ if [[ " ${port} " == " 0" ]]; then
65
+ echo " script \" true\" "
66
+ else
67
+ echo " script \" </dev/tcp/${serviceip} /${port} \" "
64
68
fi
65
- echo " script \" </dev/tcp/${serviceip} /${port} \" "
66
69
fi
67
70
68
71
echo " interval ${CHECK_INTERVAL_SECS} "
@@ -165,8 +168,6 @@ function generate_vip_section() {
165
168
166
169
#
167
170
# Generate vrrpd instance configuration section.
168
- # This generates the vrrp_sync_group and vrrp_instance
169
- # There is one VIP per vrrp_sync_group
170
171
#
171
172
# Examples:
172
173
# generate_vrrpd_instance_config arp 1 "10.1.2.3" enp0s8 "252" "master"
You can’t perform that action at this time.
0 commit comments