From 53a7761b10978e1db757d27e0404ffeb76b71e79 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 22:12:52 +0800 Subject: [PATCH] #87 --- plugins/redis/index.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/redis/index.py b/plugins/redis/index.py index 0a7f24910..5c57d2fef 100755 --- a/plugins/redis/index.py +++ b/plugins/redis/index.py @@ -96,9 +96,12 @@ def initDreplace(): # config replace dst_conf = getServerDir() + '/redis.conf' - conf_content = mw.readFile(getConfTpl()) - conf_content = conf_content.replace('{$SERVER_PATH}', service_path) - mw.writeFile(dst_conf, conf_content) + 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) + mw.writeFile(dst_conf, conf_content) + mw.writeFile(dst_conf_init, 'ok') # systemd systemDir = '/lib/systemd/system'