#!/bin/bash
#--------------第一部分:变量及函数定义-----------------#
###Begin Variables define###
ssh_port=22
cmd=/sbin/ifconfig
vip=172.16.4.116
device=eth0:0
netmk=255.255.255.0
start_vip="${cmd} ${device} ${vip} netmask ${netmk} up"
stop_vip="${cmd} ${device} ${vip} netmask ${netmk} down"
###End Variables define###
###Begin Status Funciont###
status()
{
exit 0
}
###End Status Funciont###
###Begin Stop Or Stopssh Funciont###
stop()
{
exit 0
}
###End Stop Or Stopssh Funciont###
###Begin Start Funciont###
start()
{
/usr/bin/ssh -p ${ssh_port} ${ssh_user}@${orig_master_host} ""${stop_vip}""
/usr/bin/ssh -p ${ssh_port} ${ssh_user}@${new_master_host} ""${start_vip}""
exit 0
}
###End Start Funciont###
#--------------第一部分:变量及函数定义-----------------#
#--------------第二部分:命令行参数-----------------#
###Begin Get The Command-Line Parameters###
eval
shell 实现MHA的master_ip_failover
最新推荐文章于 2022-09-28 13:50:24 发布