From 3106c101d8ee4ecedab879f5aa5015c3b85d216f Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Wed, 2 Oct 2024 00:00:51 +0800 Subject: [PATCH] Update index.py --- plugins/pgadmin/index.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/pgadmin/index.py b/plugins/pgadmin/index.py index 8f792656c..3b9bcadd4 100755 --- a/plugins/pgadmin/index.py +++ b/plugins/pgadmin/index.py @@ -175,8 +175,9 @@ def initPgConfFile(): file_tpl = getPluginDir() + '/conf/config_local.conf' dst_file = getServerDir()+'/run/lib/python3.10/site-packages/pgadmin4/config_local.py' if not os.path.exists(dst_file): + service_path = mw.getServerDir() content = mw.readFile(file_tpl) - content = contentReplace(content) + content = content.replace('{$SERVER_PATH}', service_path+'/'+getPluginName()+'/data') mw.writeFile(dst_file, content) @@ -207,7 +208,7 @@ def initReplace(): systemServiceTpl = getPluginDir() + '/init.d/pgadmin.service.tpl' service_path = mw.getServerDir() content = mw.readFile(systemServiceTpl) - content = content.replace('{$SERVER_PATH}', service_path) + content = content.replace('{$APP_PATH}', service_path) mw.writeFile(systemService, content) mw.execShell('systemctl daemon-reload')