a7750800f2
This patch migrates the keepalived element from map-services to svc-map by adding a svc-map file and adding the -a option to os-svc-install script calls. Change-Id: I326808b29b812381837d9e0bd2589edec1052092
18 lines
415 B
Bash
Executable File
18 lines
415 B
Bash
Executable File
#!/bin/bash
|
|
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 -an keepalived
|
|
|
|
if [ -e /var/run/keepalived.pid ] && pgrep -F /var/run/keepalived.pid keepalived &>/dev/null; then
|
|
service keepalived reload
|
|
else
|
|
service keepalived restart
|
|
fi
|