tripleo-image-elements/elements/keepalived/os-refresh-config/configure.d/22-keepalived
Ryan Brady a7750800f2 Migrate keepalived to svc-map
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
2014-11-24 08:07:00 -05:00

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