From dee7abc8504df3335af4c3df5a2bfd5332aa9918 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Wed, 2 Oct 2024 01:40:02 +0800 Subject: [PATCH] Update index.py --- plugins/pgadmin/index.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/pgadmin/index.py b/plugins/pgadmin/index.py index fe172e0f9..435497b51 100755 --- a/plugins/pgadmin/index.py +++ b/plugins/pgadmin/index.py @@ -200,7 +200,10 @@ def initReplace(): setCfg('password', password) mw.writeFile(pma_path, pass_cmd) - #mw.execShell("python /www/server/pgadmin/run/lib/python3.10/site-packages/pgadmin4/setup.py add-user mw@gmail.com 123123") + judge_file = getServerDir()+'/data/pgadmin4/pgadmin4.db' + if not os.path.exists(judge_file): + pg_init_bash = getPluginDir()+'/pg_init.sh' + mw.execShell("bash "+pg_init_bash) # systemd systemDir = mw.systemdCfgDir()