From 1f52d6941037abf1c26f9e88a0465fdd681ac1bb Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 23 Oct 2023 15:52:03 +0800 Subject: [PATCH] Update keepalived.tpl --- plugins/keepalived/init.d/keepalived.tpl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/keepalived/init.d/keepalived.tpl b/plugins/keepalived/init.d/keepalived.tpl index f24934565..494593df4 100644 --- a/plugins/keepalived/init.d/keepalived.tpl +++ b/plugins/keepalived/init.d/keepalived.tpl @@ -9,13 +9,17 @@ # description: Start and stop Keepalived # Source function library -. /etc/rc.d/init.d/functions +if [ -f /etc/rc.d/init.d/functions ];then + . /etc/rc.d/init.d/functions +fi +SYS_KP_FILE={$SERVER_PATH}/keepalived/etc/sysconfig/keepalived # Source configuration file (we set KEEPALIVED_OPTIONS there) -. /etc/sysconfig/keepalived +if [ -f $SYS_KP_FILE ];then + . SYS_KP_FILE +fi RETVAL=0 - prog="keepalived" start() {