finish script
This commit is contained in:
parent
e8fb1f02e2
commit
4ae2a8641f
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
# set -x (bash debug) if log level is trace
|
||||||
|
# https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/log-helper
|
||||||
|
log-helper level eq trace && set -x
|
||||||
|
|
||||||
|
# try to delete virtual ips from interface
|
||||||
|
for vip in $(complex-bash-env iterate KEEPALIVED_VIRTUAL_IPS)
|
||||||
|
do
|
||||||
|
ip addr del ${vip}/32 dev ${KEEPALIVED_INTERFACE} || true
|
||||||
|
done
|
||||||
|
|
||||||
|
exit 0
|
|
@ -39,6 +39,12 @@ if [ ! -e "$FIRST_START_DONE" ]; then
|
||||||
touch $FIRST_START_DONE
|
touch $FIRST_START_DONE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# try to delete virtual ips from interface
|
||||||
|
for vip in $(complex-bash-env iterate KEEPALIVED_VIRTUAL_IPS)
|
||||||
|
do
|
||||||
|
ip addr del ${vip}/32 dev ${KEEPALIVED_INTERFACE} || true
|
||||||
|
done
|
||||||
|
|
||||||
if [ ! -e "/etc/backup-manager.conf" ]; then
|
if [ ! -e "/etc/backup-manager.conf" ]; then
|
||||||
ln -sf ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf /etc/keepalived/keepalived.conf
|
ln -sf ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf /etc/keepalived/keepalived.conf
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue