diff --git a/plugins/keepalived/index.py b/plugins/keepalived/index.py index dec8099c2..e4c2e4730 100755 --- a/plugins/keepalived/index.py +++ b/plugins/keepalived/index.py @@ -104,14 +104,11 @@ def initDreplace(): mw.execShell('chmod +x ' + file_bin) # config replace - dst_conf = getServerDir() + '/keepalived.conf' + dst_conf = getServerDir() + '/etc/keepalived/keepalived.conf' dst_conf_init = getServerDir() + '/init.pl' if not os.path.exists(dst_conf_init): conf_content = mw.readFile(getConfTpl()) conf_content = conf_content.replace('{$SERVER_PATH}', service_path) - conf_content = conf_content.replace( - '{$REDIS_PASS}', mw.getRandomString(10)) - mw.writeFile(dst_conf, conf_content) mw.writeFile(dst_conf_init, 'ok') diff --git a/plugins/keepalived/init.d/keepalived.tpl b/plugins/keepalived/init.d/keepalived.tpl index 494593df4..ddb21375b 100644 --- a/plugins/keepalived/init.d/keepalived.tpl +++ b/plugins/keepalived/init.d/keepalived.tpl @@ -16,7 +16,7 @@ fi SYS_KP_FILE={$SERVER_PATH}/keepalived/etc/sysconfig/keepalived # Source configuration file (we set KEEPALIVED_OPTIONS there) if [ -f $SYS_KP_FILE ];then - . SYS_KP_FILE + . $SYS_KP_FILE fi RETVAL=0