Merge "Don't start keepalived service until required configuration is available"
This commit is contained in:
commit
794dd72858
|
@ -3,4 +3,3 @@
|
|||
set -eux
|
||||
|
||||
install-packages keepalived
|
||||
os-svc-enable -n keepalived
|
||||
|
|
|
@ -2,6 +2,14 @@
|
|||
set -eux
|
||||
set -o pipefail
|
||||
|
||||
INTERFACES=$(os-apply-config --key virtual_interfaces.instances --type raw --key-default '')
|
||||
if [ -z "$INTERFACES" ] ; then
|
||||
echo "No virtual interfaces to use"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
os-svc-enable -n keepalived
|
||||
|
||||
if [ -e /var/run/keepalived.pid ] && pgrep -F /var/run/keepalived.pid keepalived &>/dev/null; then
|
||||
service keepalived reload
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue