This commit is contained in:
midoks
2023-10-23 16:03:10 +08:00
parent 1f52d69410
commit 9e9dad7325
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -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')