Keepalived reload check addition

This commit changes the keepalived script such that if keepalived is
already running, then it is sent a reload command instead of a
restart command.

Change-Id: I29613bf314fd054d0c82492692d95de2303c64ae
This commit is contained in:
Julia Kreger 2014-07-15 06:55:14 -04:00 committed by James Polley
parent f8f49ffbc2
commit 73e1ae1fbb
1 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,9 @@
#!/bin/bash
set -eux
set -o pipefail
service keepalived restart
if [ -e /var/run/keepalived.pid ] && pgrep -F /var/run/keepalived.pid keepalived &>/dev/null; then
service keepalived reload
else
service keepalived restart
fi