--follow-symlinks
This commit is contained in:
parent
c11e41c673
commit
56e95efc54
|
@ -11,30 +11,30 @@ if [ ! -e "$FIRST_START_DONE" ]; then
|
||||||
#
|
#
|
||||||
# bootstrap config
|
# bootstrap config
|
||||||
#
|
#
|
||||||
sed -i "s|{{ keepalived_interface }}|$KEEPALIVED_INTERFACE|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
sed -i --follow-symlinks "s|{{ keepalived_interface }}|$KEEPALIVED_INTERFACE|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||||
sed -i "s|{{ keepalived_priority }}|$KEEPALIVED_PRIORITY|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
sed -i --follow-symlinks "s|{{ keepalived_priority }}|$KEEPALIVED_PRIORITY|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||||
sed -i "s|{{ keepalived_password }}|$KEEPALIVED_PASSWORD|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
sed -i --follow-symlinks "s|{{ keepalived_password }}|$KEEPALIVED_PASSWORD|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||||
|
|
||||||
if [ -n "$KEEPALIVED_NOTIFY" ]; then
|
if [ -n "$KEEPALIVED_NOTIFY" ]; then
|
||||||
sed -i "s|{{ keepalived_notify }}|notify \"$KEEPALIVED_NOTIFY\"|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
sed -i --follow-symlinks "s|{{ keepalived_notify }}|notify \"$KEEPALIVED_NOTIFY\"|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||||
chmod +x $KEEPALIVED_NOTIFY
|
chmod +x $KEEPALIVED_NOTIFY
|
||||||
else
|
else
|
||||||
sed -i "/{{ keepalived_notify }}/d" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
sed -i --follow-symlinks "/{{ keepalived_notify }}/d" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# unicast peers
|
# unicast peers
|
||||||
for peer in $(complex-bash-env iterate KEEPALIVED_UNICAST_PEERS)
|
for peer in $(complex-bash-env iterate KEEPALIVED_UNICAST_PEERS)
|
||||||
do
|
do
|
||||||
sed -i "s|{{ keepalived_unicast_peers }}|${!peer}\n {{ keepalived_unicast_peers }}|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
sed -i --follow-symlinks "s|{{ keepalived_unicast_peers }}|${!peer}\n {{ keepalived_unicast_peers }}|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||||
done
|
done
|
||||||
sed -i "/{{ keepalived_unicast_peers }}/d" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
sed -i --follow-symlinks "/{{ keepalived_unicast_peers }}/d" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||||
|
|
||||||
# virtual ips
|
# virtual ips
|
||||||
for vip in $(complex-bash-env iterate KEEPALIVED_VIRTUAL_IPS)
|
for vip in $(complex-bash-env iterate KEEPALIVED_VIRTUAL_IPS)
|
||||||
do
|
do
|
||||||
sed -i "s|{{ keepalived_virtual_ips }}|${!vip}\n {{ keepalived_virtual_ips }}|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
sed -i --follow-symlinks "s|{{ keepalived_virtual_ips }}|${!vip}\n {{ keepalived_virtual_ips }}|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||||
done
|
done
|
||||||
sed -i "/{{ keepalived_virtual_ips }}/d" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
sed -i --follow-symlinks "/{{ keepalived_virtual_ips }}/d" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
|
||||||
|
|
||||||
touch $FIRST_START_DONE
|
touch $FIRST_START_DONE
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue